PowerShell – Return Current User Posted onNovember 4, 2020July 15, 2022AuthorMrNetTek [System.Security.Principal.WindowsIdentity]::GetCurrent().Name Notes WindowsIdentity Class System.Security.Principal Namespace