Skip to content

Remove‑ServiceAccessRule

raandree edited this page Sep 6, 2026 · 1 revision

SYNOPSIS

Removes an exact access rule from a local service or the SCM.

SYNTAX

Remove-ServiceAccessRule [-InputObject] <PSObject> [-PassThru] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Accepts a path-bound service or SCM access rule, removes the matching explicit ACE only, and preserves every unrelated descriptor entry.

EXAMPLES

EXAMPLE 1

Get-ServiceAccessRule -Name BITS -Account Everyone | Remove-ServiceAccessRule -WhatIf

Previews exact removal of the selected BITS access rule.

PARAMETERS

-InputObject

A path-bound rule returned by Get-ServiceAccessRule.

Type: PSObject
Parameter Sets: (All)
Aliases:

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

-PassThru

Returns the removed rule after successful persistence.

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

WindowsAccessControl.ServiceAccessRule

WindowsAccessControl.ServiceControlManagerAccessRule

OUTPUTS

None

WindowsAccessControl.ServiceAccessRule

WindowsAccessControl.ServiceControlManagerAccessRule

NOTES

RELATED LINKS

Home

Commands

DSC resources

Clone this wiki locally