Protect-Acl

Protects an ACL so that changes to its parent can't be inherited to it.

Syntax

Protect-Acl [-Path] <String> [-Preserve] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

New items in the registry or file system will usually inherit ACLs from its parent. This function stops an item from inheriting rules from its, and will optionally preserve the existing inherited rules. Any existing, non-inherited access rules are left in place.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Path String

The file system or registry path whose

true true (ByValue, ByPropertyName)
Preserve SwitchParameter

Keep the inherited access rules on this item.

false false False
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.

EXAMPLE 1

Protect-Acl -Path C:\Projects\Carbon

Removes all inherited access rules from the C:\Projects\Carbon directory. Non-inherited rules are preserved.

EXAMPLE 2

Protect-Acl -Path hklm:\Software\Carbon -Preserve

Stops HKLM:\Software\Carbon from inheriting acces rules from its parent, but preserves the existing, inheritied access rules.