Impersonate Windows built-in SYSTEM account.
Impersonate Windows built-in SYSTEM account and execute commands on its behalf by invoking a scriptblock.
Note: Requires to be run as Administrator.
Install from PowerShell Gallery
Install-Module -Name ImpersonateSystemor
git clone https://github.com/tobiohlala/ImpersonateSystemImport-Module ImpersonateSystem
Invoke-AsSystem { [System.Environment]::UserName }Get-Help Invoke-AsSystem -Examples