Skip To Content
PowerShell Gallery
Toggle navigation
Packages
Publish
Documentation
Sign in
Search PowerShell packages:
WozTools
1.35
Public/Test-IfAdmin.ps1
Function
Test-IfAdmin
{
Return
(
[Security.Principal.WindowsPrincipal]
[Security.Principal.WindowsIdentity]
::
GetCurrent
(
)
)
.
IsInRole
(
[Security.Principal.WindowsBuiltInRole]
::
Administrator
)
}