Public/Windows/Test-WindowsIsAdmin.ps1
# REFACTOR: Linux Support function Test-WindowsIsAdmin { $Identity = [System.Security.Principal.WindowsIdentity]::GetCurrent() $Principal = New-Object System.Security.Principal.WindowsPrincipal($Identity) $Principal.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator) } |