Skip to content

Remove‑ScheduledTaskAccessRule

raandree edited this page Sep 6, 2026 · 1 revision

SYNOPSIS

Removes one exact access rule from a contained local registered task.

SYNTAX

Remove-ScheduledTaskAccessRule [-InputObject] <PSObject> [-AllowedRootPath] <String> [-PassThru]
 [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Accepts a task-bound rule, revalidates its canonical local target and containment boundary, removes one exact native ACE, and preserves every unrelated task descriptor entry. Removal is idempotent: an ACE that is already absent leaves the descriptor unchanged and succeeds.

EXAMPLES

EXAMPLE 1

Get-ScheduledTaskAccessRule -TaskPath '\Operations' -TaskName 'Cleanup' -ExcludeInherited |
    Remove-ScheduledTaskAccessRule -AllowedRootPath '\Operations' -WhatIf

Previews exact removal of the selected local registered-task rule.

PARAMETERS

-AllowedRootPath

The explicit non-system folder boundary containing the write target.

Type: String
Parameter Sets: (All)
Aliases:

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

-InputObject

A task-bound rule returned by Get-ScheduledTaskAccessRule.

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.ScheduledTaskAccessRule

OUTPUTS

None

WindowsAccessControl.ScheduledTaskAccessRule

NOTES

RELATED LINKS

Home

Commands

DSC resources

Clone this wiki locally