Created
January 5, 2021 18:18
-
-
Save Riebart/f4e9960d7d13fbbe22da540f222ec9f8 to your computer and use it in GitHub Desktop.
Disconnect the first active session on Windows and reconnect the console session. Useful for disconnecting RDP to use Steam Streaming.
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
$session=(query session | select-string Active)[0].ToString().split(" ")[0].substring(1) | |
Start-Process -verb runas tscon -ArgumentList "$session /dest:console" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment