Last active
May 2, 2017 14:12
-
-
Save darrenpmeyer/2577db0ca08b695549e4 to your computer and use it in GitHub Desktop.
Shortcut (Run as Administrator!) to disconnect RDP and stay logged in on console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
%CSIDL_SYSTEM%\tscon.exe %sessionname% /dest:console | |
REM - run this as Administrator (or it won't work properly!) | |
REM | |
REM - disconnecting from RDP usually locks the console. If you don't want that, | |
REM - such as when running a headless Steam game server, then use this to end | |
REM - your sessions instead. | |
REM | |
REM - note that it can take up to 30s to disconnect this way, such is life. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment