
Use PowerShell to get the Current Username and Sid from an Elevated Session
This post shows how to use PowerShell to get the current username and sid from an elevated session. Typically speaking, if you were running powershell.exe as an elevated user and typed $env:USERNAME you would see the username of the elevated...








