Cmdlets

Choose a cmdlet from the list on the left or search for a specific cmdlet. Choose a cmdlet from the list or search for a specific cmdlet.
About Help  Providers
 

Set-Privilege

Set-Privilege

pscx.dll

Synopsis

PSCX Cmdlet: Adjusts privileges associated with a user (identity).

Syntax

Set-Privilege [-Privileges] [-Identity] [<CommonParameters>]

Detailed Description

Adjusts privileges associated with a user (identity).

Parameters

-Privileges <TokenPrivilegeCollection>

The privileges to modify. See http://msdn.microsoft.com/en-us/library/bb530716(VS.85).aspx for details.

Aliases

None

Required?

true

Position

1

Default value

None

Accept pipeline input?

false

Accept wildcard characters?

false

-Identity <WindowsIdentity>

The identity to act upon.

Aliases

None

Required?

false

Position

2

Default value

None

Accept pipeline input?

true (ByValue)

Accept wildcard characters?

false

Input Type


Return Type


Notes

Examples

-------------------------- EXAMPLE 1 --------------------------

This enables the SeTimeZonePrivilege for the current user.

$p = Get-Privilege
$p.Enable('SeTimeZonePrivilege')
Set-Privilege $p
Get-Privilege | ft Name, Status -a

Name Status
---- ------
SeShutdownPrivilege Disabled
SeChangeNotifyPrivilege EnabledByDefault, Enabled
SeUndockPrivilege Disabled
SeIncreaseWorkingSetPrivilege Disabled
SeTimeZonePrivilege Enabled