< Back
Test-CPrivilege
Post
NAME Test-CPrivilege
SYNOPSIS
Tests if an identity has a given privilege.
SYNTAX
Test-CPrivilege [-Identity] <String> [-Privilege] <String> [<CommonParameters>]
DESCRIPTION
Returns `true` if an identity has a privilege. `False` otherwise.
PARAMETERS
-Identity <String>
The identity whose privileges to check.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Privilege <String>
The privilege to check.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Test-CPrivilege -Identity Forrester -Privilege SeServiceLogonRight
Tests if `Forrester` has the `SeServiceLogonRight` privilege.
RELATED LINKS
Carbon_Privilege
Get-CPrivilege
Grant-CPrivilege
Revoke-CPrivilege
SYNOPSIS
Tests if an identity has a given privilege.
SYNTAX
Test-CPrivilege [-Identity] <String> [-Privilege] <String> [<CommonParameters>]
DESCRIPTION
Returns `true` if an identity has a privilege. `False` otherwise.
PARAMETERS
-Identity <String>
The identity whose privileges to check.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Privilege <String>
The privilege to check.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Test-CPrivilege -Identity Forrester -Privilege SeServiceLogonRight
Tests if `Forrester` has the `SeServiceLogonRight` privilege.
RELATED LINKS
Carbon_Privilege
Get-CPrivilege
Grant-CPrivilege
Revoke-CPrivilege