Public/Test-IfAdmin.ps1

1
2
3
4
Function Test-IfAdmin {
    ([System.Security.Principal.WindowsPrincipal][System.Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator)
}