Skip to content

Disable‑WindowsPrivilege

raandree edited this page Sep 6, 2026 · 1 revision

SYNOPSIS

Disables a privilege in the current process token.

SYNTAX

Disable-WindowsPrivilege [-Name] <String[]> [-PassThru] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Disables a Windows privilege already assigned to the current process token. This does not remove the privilege from the token permanently.

EXAMPLES

EXAMPLE 1

Disable-WindowsPrivilege -Name SeSecurityPrivilege

Disables SACL access in the current PowerShell process token.

PARAMETERS

-Name

The Windows privilege constant name to disable in the current process. Tab completion offers the well-known Windows privilege constants.

Type: String[]
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-PassThru

Returns the enabled state after the token is changed.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

OUTPUTS

None

System.Boolean

NOTES

RELATED LINKS

Home

Commands

DSC resources

Clone this wiki locally