Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.
Easily check who you are logged in as in PowerShell.
March 27, 2017
Q. How can I check who I am logged in with in PowerShell?
A. While commands such as whoami work in PowerShell there is a native option:
$me = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
$me.Identities.Name
You May Also Like