Using remote desktop without having to login after disconnecting

I am always using remote desktop to connect to various machines around the house as well as virtual machines and it always annoys me that when I disconnect from the console.  I came across a solution today that leaves the console logged in!!  All you need to do is disconnect using the following command:

tscon.exe 0 /dest:console

In my case I created a batch file with this single line in it and replicated it to all the machines in the house, and added a shortcut to it from each Start Menu.  Now when I need to disconnect I just click the shortcut, works like a charm.  It’s especially useful on my Tablet as I don’t have the keyboard attached.

It works like this:

You were locally logged into the host at some point and are STILL logged in
there – but are no longer actually in front of the PC – but at a remote
location. You start a
remote desktop connection to the host and log in as
the same user – essentially continuing the session you were logged in
locally when you were physically at the host. To end your session, instead
of disconnecting you run the command line: “tscon 0 /dest:console”, which
essentially pushes the current session back to the console – or makes it
look like you never interrupted the local session. Thus when you get back
to the host, it is like you never left that original session.

Steve Richards

I'm retired from work as a business and IT strategist. now I'm travelling, hiking, cycling, swimming, reading, gardening, learning, writing this blog and generally enjoying good times with friends and family

7 Responses

  1. Anonymous says:

    Hi Steve, thanks a lot for posting this solution!
    It works fine and does what i need.

  2. Anonymous says:

    brilliant! been looking for something like this for ages. Sweet and simple 🙂

  3. Anonymous says:

    Absolutely Brilliant!

    Was going nuts until I found this simple solution!

  4. Anonmous says:

    Thank you, thank you, thank you! This is just what I was looking for. It was really hard to find this information. Exactly what I needed for home use.

  5. brad says:

    Hi there. This works great. Thanks, I’ve been looking for a solution to this issue. But, I’m having one problem. When I execute the command, it leaves my “host” computer unlocked. Anyone else have this problem?


  6. Tuan Pham Anh says:

    Awesome. Thank you very much!

  7. TC says:

    Thank you!!!! Brilliant, exactly what i’m searching.

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: