Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Disconnect the first active session on Windows and reconnect the console session. Useful for disconnecting RDP to use Steam Streaming.
$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