Skip to content

Remove‑ServiceAuditRule

raandree edited this page Sep 6, 2026 · 1 revision

SYNOPSIS

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

SYNTAX

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

DESCRIPTION

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

EXAMPLES

EXAMPLE 1

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

Previews exact removal of the selected BITS audit rule.

PARAMETERS

-InputObject

A path-bound rule returned by Get-ServiceAuditRule.

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 audit 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.ServiceAuditRule

WindowsAccessControl.ServiceControlManagerAuditRule

OUTPUTS

None

WindowsAccessControl.ServiceAuditRule

WindowsAccessControl.ServiceControlManagerAuditRule

NOTES

RELATED LINKS

Home

Commands

DSC resources

Clone this wiki locally