Test-Privilege

Tests if an identity has a given privilege.

Syntax

Test-Privilege [-Identity] <String> [-Privilege] <String> [<CommonParameters>]

Description

Returns true if an identity has a privilege. False otherwise.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Identity String

The identity whose privileges to check.

true false
Privilege String

The privilege to check.

true false

EXAMPLE 1

Test-Privilege -Identity Forrester -Privilege SeServiceLogonRight

Tests if Forrester has the SeServiceLogonRight privilege.