< Back

Revoke-CPrivilege

Sun Jan 12, 2020 11:05 pm

NAME Revoke-CPrivilege



SYNOPSIS

Revokes an identity's privileges to perform system operations and certain types of logons.





SYNTAX

Revoke-CPrivilege [-Identity] <String> [-Privilege] <String[]> [<CommonParameters>]





DESCRIPTION

Valid privileges are documented on Microsoft's website: [Privilege

Constants](http://msdn.microsoft.com/en-us/library ... 30716.aspx) and [Account Right

Constants](http://msdn.microsoft.com/en-us/library ... 45671.aspx). Known values as of August 2014

are:



* SeAssignPrimaryTokenPrivilege

* SeAuditPrivilege

* SeBackupPrivilege

* SeBatchLogonRight

* SeChangeNotifyPrivilege

* SeCreateGlobalPrivilege

* SeCreatePagefilePrivilege

* SeCreatePermanentPrivilege

* SeCreateSymbolicLinkPrivilege

* SeCreateTokenPrivilege

* SeDebugPrivilege

* SeDenyBatchLogonRight

* SeDenyInteractiveLogonRight

* SeDenyNetworkLogonRight

* SeDenyRemoteInteractiveLogonRight

* SeDenyServiceLogonRight

* SeEnableDelegationPrivilege

* SeImpersonatePrivilege

* SeIncreaseBasePriorityPrivilege

* SeIncreaseQuotaPrivilege

* SeIncreaseWorkingSetPrivilege

* SeInteractiveLogonRight

* SeLoadDriverPrivilege

* SeLockMemoryPrivilege

* SeMachineAccountPrivilege

* SeManageVolumePrivilege

* SeNetworkLogonRight

* SeProfileSingleProcessPrivilege

* SeRelabelPrivilege

* SeRemoteInteractiveLogonRight

* SeRemoteShutdownPrivilege

* SeRestorePrivilege

* SeSecurityPrivilege

* SeServiceLogonRight

* SeShutdownPrivilege

* SeSyncAgentPrivilege

* SeSystemEnvironmentPrivilege

* SeSystemProfilePrivilege

* SeSystemtimePrivilege

* SeTakeOwnershipPrivilege

* SeTcbPrivilege

* SeTimeZonePrivilege

* SeTrustedCredManAccessPrivilege

* SeUndockPrivilege

* SeUnsolicitedInputPrivilege





PARAMETERS

-Identity <String>

The identity to grant a privilege.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Privilege <String[]>

The privileges to revoke.



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:\\>Revoke-CPrivilege -Identity Batcomputer -Privilege SeServiceLogonRight



Revokes the Batcomputer account's ability to logon as a service. Don't restart that thing!











RELATED LINKS

Carbon_Privilege

Get-CPrivilege

Grant-CPrivilege

Test-CPrivilege

http://msdn.microsoft.com/en-us/library ... 30716.aspx

http://msdn.microsoft.com/en-us/library ... 45671.aspx