Skip to content

Instantly share code, notes, and snippets.

@karoltheguy
Created April 28, 2021 20:28
Show Gist options
  • Save karoltheguy/71ebf44099932f2bf0f5d59e78a21454 to your computer and use it in GitHub Desktop.
Save karoltheguy/71ebf44099932f2bf0f5d59e78a21454 to your computer and use it in GitHub Desktop.
Exit RDP and modify the session to a "console" type
@echo off
for /f "tokens=3 usebackq" %%s in (`query user ^ | find /i "%username%"`) do (tscon %%s /dest:console /password:xxx)
@karoltheguy
Copy link
Author

Only need to be an admin, no need for an actual password

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