Created
February 15, 2014 14:14
-
-
Save Nora-Ballard/9019804 to your computer and use it in GitHub Desktop.
Moves the active RDP session of the specified user to the physical console, the session remains unlocked. This allows one to leave the physical console unlocked after using RDP. Great for Media Center PC or Nvidia/Steam Game Streaming. See https://serverfault.com/questions/428975/how-to-use-tscon-on-windows7
This file contains hidden or 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 | |
| if "%1" == "" goto error | |
| for /f "skip=1 tokens=3 usebackq" %%s in ( | |
| `query user %1%` | |
| ) do ( | |
| echo Setting %%s to console. | |
| %windir%\System32\tscon.exe %%s /dest:console | |
| ) | |
| goto end | |
| :error | |
| echo missing argument! | |
| :end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment