Closing a Windows Remote Desktop connection leaves the host machine locked, but it is possible to create a shortcut that will close the session without locking the screen.

To create the shortcut:

  1. Right click on the Desktop and select NewShortcut

    New shortcut dialog screenshot
  2. For Windows 7/Vista hosts, enter the following:

<del datetime="2011-09-08T19:11:49+00:00">`%windir%\System32\tscon.exe %sessionname% /dest:console`</del>

     Update 8/9/11: After a recent system update, using the %sessionname% variable started causing an error. I switched to hard-coding 1 instead and this has worked so far.


`%windir%\System32\tscon.exe 1 /dest:console`

For __Windows XP hosts__, enter the following:

`%windir%\System32\tscon.exe 0 /dest:console`
  1. Click Next, enter a name for the shortcut and then click Finish. The name can be anything you like.

    New shortcut dialog screenshot
  2. On Windows 7/Vista hosts, this shortcut needs to be run with administrator privileges. Right click on the newly created shortcut and select Properties.

  3. Click the Advanced button on the Properties window.

  4. Check the box marked Run as administrator and then click OK.

    Advanced properties screenshot

Pin the shortcut to the Start menu or the taskbar and click it when you would like to disconnect.