< Back
Disable-CAclInheritance
Post
NAME Disable-CAclInheritance
SYNOPSIS
Protects an ACL so that changes to its parent can't be inherited to it.
SYNTAX
Disable-CAclInheritance [-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-CAclInheritance`.
Beginning in Carbon 2.4, this function will only disable inheritance if it is currently enabled. In previous
versions, it always disabled inheritance.
PARAMETERS
-Path <String>
The file system or registry path whose access rule should stop inheriting from its parent.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Preserve [<SwitchParameter>]
Keep the inherited access rules on this item.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Disable-CAclInheritance -Path C:\\Projects\\Carbon
Removes all inherited access rules from the `C:\\Projects\\Carbon` directory. Non-inherited rules are preserved.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Disable-CAclInheritance -Path hklm:\\Software\\Carbon -Preserve
Stops `HKLM:\\Software\\Carbon` from inheriting acces rules from its parent, but preserves the existing, inheritied
access rules.
RELATED LINKS
Disable-CAclInheritance
Get-CPermission
Grant-CPermission
Revoke-CPermission
SYNOPSIS
Protects an ACL so that changes to its parent can't be inherited to it.
SYNTAX
Disable-CAclInheritance [-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-CAclInheritance`.
Beginning in Carbon 2.4, this function will only disable inheritance if it is currently enabled. In previous
versions, it always disabled inheritance.
PARAMETERS
-Path <String>
The file system or registry path whose access rule should stop inheriting from its parent.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
-Preserve [<SwitchParameter>]
Keep the inherited access rules on this item.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Disable-CAclInheritance -Path C:\\Projects\\Carbon
Removes all inherited access rules from the `C:\\Projects\\Carbon` directory. Non-inherited rules are preserved.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Disable-CAclInheritance -Path hklm:\\Software\\Carbon -Preserve
Stops `HKLM:\\Software\\Carbon` from inheriting acces rules from its parent, but preserves the existing, inheritied
access rules.
RELATED LINKS
Disable-CAclInheritance
Get-CPermission
Grant-CPermission
Revoke-CPermission