Test-AdminPrivilege

Checks if the current user is an administrator or has administrative privileges.

Syntax

Test-AdminPrivilege [<CommonParameters>]

Description

Many tools, cmdlets, and APIs require administative privileges. Use this function to check. Returns True if the current user has administrative privileges, or False if he doesn't. Or she. Or it.

This function handles UAC and computers where UAC is disabled.

EXAMPLE 1

Test-AdminPrivilege

Returns True if the current user has administrative privileges, or False if the user doesn't.