Skip to content

Instantly share code, notes, and snippets.

@alimbada
Created May 16, 2015 14:20
Show Gist options
  • Save alimbada/c4f05073b457e4c661b7 to your computer and use it in GitHub Desktop.
Save alimbada/c4f05073b457e4c661b7 to your computer and use it in GitHub Desktop.
Unlocks the screen on a remote Windows machine (so that I can stream games from it with Steam In-Home Streaming)
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "$sessionid=((quser $env:USERNAME | select -Skip 1) -split '\s+')[2]; tscon $sessionid /dest:console" 2> UnlockErrors.log
@kuroiokami
Copy link

This worked great!! But now I can't use remote desktop anymore. I already rebooted once and same problem. Do you know what might be wrong?

@alimbada
Copy link
Author

@kuroiokami did you check if Remote Desktop is enabled? Maybe it got disabled?

P.S. Sorry for the late reply. Github doesn't notify when comments are made on gists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment