Remote Desktop Connection Without Locking Remote Computer Session on Disconnect

»»»Remote Desktop Connection Without Locking Remote Computer Session on Disconnect
When connecting to a remote computer via Remote Desktop Connection (RDC), the Windows operating system will lock the local session on remote computer’s console who is logging in with the same user account, interrupting user who is physically using the server or client computer.

To make matter worse and the RDP behavior more annoying, Windows won’t automatically release the lock on the local session on console screen to show the desktop upon termination of Remote Desktop Connection. This creates problem for people who needs the local user logged in to be always unlocked and stay logged on, especially for administrator or user who doesn’t have physical access to the remote computer.

If you need to unlock the remote computer after closing the Remote Desktop Connection, here’s a trick which you can use to force RDP to disconnect without locking the session and logged local user back in on the local console screen upon disconnection of Remote Desktop Connection.

On the remote system connected through RDC (not on your computer which RDC is initialized to connect to remote system), open a Command Prompt window as administrator, then run the command depending on the Windows operating system that is running on the remote system.

On Windows XP:

tscon 0 /dest:console

On Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10 or newer:

tscon 1 /dest:console

On Windows Server:

tscon %sessionname% /dest:console

No Locking Local Console when Using Remote Desktop Connection

About the Author:

LK is a technology writer for Tech Journey with background of system and network administrator. He has be documenting his experiences in digital and technology world for over 15 years.

Connect with LK through Tech Journey on Facebook, Twitter or Google+.

  • prasad ghole

    Thank you. This is one of the best solution to avoid hassle of using remote desktop. Which was not TRUE remote 🙂

    • Yashish Karkera

      Hello Prasad, cud u plz elaborate how did it help you as I tried doing the same steps mentioned above in the remote system and also on Local system but I get Session1 not found error

      • HopefulAdvisor

        I found that sometimes the session ID for the remote desktop connection is not always 1. At the command prompt I type “query session” and then I find the session ID for the remote desktop connection. In my case it was 3. Then I edited the command appropriately “tscon 3 /dest:console”

  • crh66

    Thanks for this!

  • Both my remote and local computers run Windows 10. I tried the “tscon 1 /dest:console” command as administrator on the remote computer both during and after an RDC session, but I got this: “SessionID 1 not found.”

    • I tried it with just Windows 10’s built-in Remote Desktop Connection too, but got the same result. Advice would be appreciated.

      • SIRS RSML

        try “query session” command first, then change the ID to match your active session.

    • jambster

      Hello Grammar.Consulting, I have the same issue, did you ever figure out a fix?

      • Hi jambster, no, nobody’s responded here including “LK,” the author of the article featured on this page, so I’m especially disappointed by that. And I haven’t had a chance to do further research to try to find the right solution somewhere else on the Web.

        My fear is that this is going to be another of those cases where there actually *isn’t* a solution, instead just one of the annoyances of Windows that we have to live with until we can trust the brain trust in Redmond to do something different in a future version of their prized OS. So about all I can do now is hope for that, while I go out and buy another lottery ticket too.

        • jambster

          Hello Grammar.Consulting, I’ve tried to reply a few times with a link to a fix that worked for me but, it looks as if the moderators won’t let it through. Maybe being automatically removed as spam if it has a link in. If you google “powershell lock remote steam” it’s the top link.

          • Hi jambster, so sorry for this late reply to your post. I’ll check out that solution, thanks so much.

  • fixer

    This tip is so great! I had my (brand new) W10 media PC lock up in the logon/locking screen each time after I ended a RDP session. At the user side, keyboard or mouse did not work anymore and had to reboot the media PC to regain control.

    This tip worked (when running the cmd as admin) immediately and solved my problem by not returning to the locking screen after ending a remote session! Thanks!

  • Balal

    hi, can anyone suggest how i can run the command on remote computer , i have a server inside the server room and session is connected on a big screen in IT Room i want to unlock the computer remotely and

Pin It on Pinterest

Share This

Share This

Share this post with your friends!