Disable-AclInheritance

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

Syntax

Disable-AclInheritance [-Path] <String> [-Preserve] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

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 -Preserve switch.

This function is paired with Enable-AclInheritance.

Beginning in Carbon 2.4, this function will only disable inheritance if it is currently enabled. In previous versions, it always disabled inheritance.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Path String

The file system or registry path whose access rule should stop inheriting from its parent.

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

Disable-AclInheritance -Path C:\Projects\Carbon

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

EXAMPLE 2

Disable-AclInheritance -Path hklm:\Software\Carbon -Preserve

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