Protects an ACL so that changes to its parent can't be inherited to it.
Disable-AclInheritance [-Path] <String> [-Preserve] [-WhatIf] [-Confirm] [<CommonParameters>]
Items in the registry or file system will inherit permissions from its parent. The
Disable-AclInheritnace function disables inheritance, removing all inherited permissions. You can optionally preserve the currently inherited permission as explicit permissions using the
This function is paired with
Beginning in Carbon 2.4, this function will only disable inheritance if it is currently enabled. In previous versions, it always disabled inheritance.
|Name||Type||Description||Required?||Pipeline Input||Default Value|
The file system or registry path whose access rule should stop inheriting from its parent.
|true||true (ByValue, ByPropertyName)|
Keep the inherited access rules on this item.
|CommonParameters||This cmdlet supports common parameters. For more information type
Disable-AclInheritance -Path C:\Projects\Carbon
Removes all inherited access rules from the
C:\Projects\Carbon directory. Non-inherited rules are preserved.
Disable-AclInheritance -Path hklm:\Software\Carbon -Preserve
HKLM:\Software\Carbon from inheriting acces rules from its parent, but preserves the existing, inheritied access rules.