Fix ERROR_CTX_WINSTATION_ALREADY_EXISTS (0x1B6F)
This happens when Remote Desktop tries to create a session name that's already taken. Here's how to kill the stale session and get back in.
What's happening here?
You try to remote into a machine and get ERROR_CTX_WINSTATION_ALREADY_EXISTS (0x1B6F). Translation: Windows Terminal Services thinks that session name (usually "RDP-Tcp" or an ID like "2") is already in use. I see this most often on Windows Server 2016/2019 when someone disconnects instead of logging off, then tries to reconnect. The session lingers, and the new connection attempt fails because the name slot is still occupied.
The 30-Second Fix: Logoff the Stale Session
If you can get to the machine locally (or via another admin session), this takes 10 seconds.
- On the affected machine, open Task Manager (Ctrl+Shift+Esc).
- Go to the Users tab. You'll see a user with a status like "Disconnected".
- Right-click that user and select Logoff.
- Confirm. This kills the session and frees the name.
Why this works: The stale session holds the session name you're trying to use. Logging it off releases it. I had a client last month whose print queue died because six disconnected sessions were eating up licenses on their 2019 server. A quick mass logoff fixed everything.
The 5-Minute Fix: Use Command Line to Kill the Session
If you can't get to the console physically, use another RDP session or PowerShell remoting.
- Open Command Prompt as Administrator on the target machine (or use PowerShell).
- Type
query sessionand press Enter. You'll see a list like:
SESSIONNAME USERNAME ID STATE TYPE DEVICE console admin 0 Active console >rdp-tcp#0 bob 1 Disc rdpwd rdp-tcp 2 Listen - Find the disconnected session (STATE = Disc). Note its ID (here it's 1).
- Type
logoff 1and press Enter. Replace 1 with the actual ID. - Try your RDP connection again.
Pro tip: If you get "Access denied" when running logoff, you don't have admin rights on that machine—use the advanced fix below.
The 15+ Minute Fix: Reset the RDP Listener
Sometimes the session name conflict is at the listener level, not a user session. This happens when the RDP-Tcp listener gets corrupted. I've seen this after botched Windows Updates on Server 2012 R2.
- Open an admin Command Prompt.
- Type
net stop termserviceand press Enter. This stops Terminal Services (all RDP sessions drop). - Delete the listener registry key. Run:
reg delete "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /f - Restart the service:
net start termservice. Windows recreates the default listener. - Recheck RDP permissions under System Properties > Remote. Usually they survive, but verify.
- Test your connection.
Warning: This kills all active RDP sessions instantly. Do it during downtime. If the error persists after this, the listener is probably corrupted beyond repair—you might need to install a Windows update or roll back a recent change.
When None of This Works
Rarely, the issue is DNS-related—the client resolves the machine name to an old IP and tries to reuse a session ID from a different machine. Flush DNS with ipconfig /flushdns on your client. Also check that your RDP client isn't trying to reconnect to a saved session with the same name. Clear your RDP client history (delete the .rdp files in Documents) and try again.
Last resort: reboot the target machine. It's nuclear but effective. Had a client whose RDP broke entirely after a bad group policy applied—reboot fixed it until we sorted the policy.
Was this solution helpful?