Private/Test-IsAdministrator.ps1
|
function Test-IsAdministrator { [System.Security.Principal.WindowsPrincipal]::new( [System.Security.Principal.WindowsIdentity]::GetCurrent() ).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator) } |