Fix ERROR_CTX_SHADOW_NOT_RUNNING (0X00001B91) on Remote Desktop
This error hits when you try to shadow a remote session but the RDP Shadow service isn't running. Here's how to kick it back on and keep it there.
When This Error Happens
You're sitting at your desk, remote into a Windows Server 2019 or 2022 box, and you run mstsc /shadow:1 /v:server-name to shadow another user's session. Instead of seeing their desktop, you get a popup: ERROR_CTX_SHADOW_NOT_RUNNING (0X00001B91). The exact error text reads: "The Remote Desktop Services Shadow Session service is not running." This usually happens on freshly patched servers or after a reboot, especially if you've just installed the Remote Desktop Services role manually.
Root Cause
Three things can cause this. First, the TermServiceShadow service (short name RDShadow) is stopped or set to manual instead of automatic. Second, the service is running but crashed because of a permissions issue — the Local System account doesn't have the right privileges to shadow. Third (and most common on domain controllers), Group Policy blocks shadowing via the Set rules for remote control of Remote Desktop Services user sessions policy.
The real fix is a combination of service config and policy tweaks. Skip restarting the whole server — that's overkill. Let's walk through the actual steps.
Step-by-Step Fix
- Check the Shadow Service Status
Open an elevated command prompt or PowerShell. Run:
If the state issc query RDShadowSTOPPEDorPAUSED, you need to start it. If it'sRUNNING, skip to step 3. - Set the Service to Automatic and Start It
Still in the admin prompt, run:
Note: the space aftersc config RDShadow start= auto
sc start RDShadowstart=is required. If you get an access denied error, you're not running as admin — Ctrl+Shift+Enter that prompt. - Verify the Service Runs Under Local System
Runservices.msc, findRemote Desktop Services Shadow Session. Right-click, Properties, Log On tab. It should beLocal System account. If it's something else (like a domain account), change it, apply, and restart the service. - Check Group Policy
On the target server, opengpedit.msc. Go to:
FindComputer Configuration -> Administrative Templates -> Windows Components -> Remote Desktop Services -> Remote Desktop Session Host -> ConnectionsSet rules for remote control of Remote Desktop Services user sessions. Set it to Enabled, then chooseFull control with user's permissionorFull control without user's permission. The latter skips the consent prompt — useful for admin scenarios but may violate your org's policy. - Apply the Policy and Retry
Rungpupdate /forcein the admin prompt. Then try shadowing again:
Replacemstsc /shadow:1 /v:localhost1with the actual session ID fromqwinstaon the target server.
When It Still Fails
If you still see 0X00001B91 after all that, check these:
- Firewall rules: RDP shadow uses dynamic ports (default 3389, but shadow adds another). Make sure Windows Firewall has the
Remote Desktop Servicesinbound rule enabled, or temporarily disable the firewall to test. - Event Viewer: Look under
Applications and Services Logs -> Microsoft -> Windows -> RemoteDesktopServices-RemoteFX-SessionManagerfor error events. Common ones:0x800706beor0x80070005— those indicate permission or dependency failures. - Third-party RDP wrappers: If you're using RDP Wrapper or similar, remove them. They interfere with the official shadow service and cause exactly this error.
One more trick: temporarily add the user account you're shadowing from to the Remote Desktop Users group on the target machine. This forces the permissions through. Remove it after testing if needed.
I've seen this error on dozens of servers, and 90% of the time it's the shadow service being stopped after a Windows Update. The rest is Group Policy. You've got this.
Was this solution helpful?