< Back

Enable-CAclInheritance

Sun Jan 12, 2020 9:16 pm

NAME Enable-CAclInheritance



SYNOPSIS

Enables ACL inheritance on an item.





SYNTAX

Enable-CAclInheritance [-Path] <String> [-Preserve] [-WhatIf] [-Confirm] [<CommonParameters>]





DESCRIPTION

Items in the registry or file system will usually inherit ACLs from its parent. This inheritance can be disabled,

either via Carbon's `Protect-Acl` function or using .NET's securei API. The `Enable-CAclInheritance` function

re-enables inheritance on containers where it has been disabled. By default, any explicit permissions on the item

are removed. Use the `-Preserve` switch to keep any existing, explicit permissions on the item.



This function is paired with `Disable-CAclInheritance`.



This function was added in Carbon 2.4.





PARAMETERS

-Path <String>

The file system or registry path who should start inheriting ACLs from its parent.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Preserve [<SwitchParameter>]

Keep the explicit access rules defined on the 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:\\>Enable-CAclInheritance -Path C:\\Projects\\Carbon



Re-enables ACL inheritance on `C:\\Projects\\Carbon`. ACLs on `C:\\Projects` will be inherited to and affect

`C:\\Projects\\Carbon`. Any explicit ACLs on `C:\\Projects\\Carbon` are removed.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Enable-CAclInheritance -Path hklm:\\Software\\Carbon -Preserve



Re-enables ACL inheritance on `hklm:\\Software\\Carbon`. ACLs on `hklm:\\Software` will be inherited to and affect

`hklm:\\Software\\Carbon`. Any explicit ACLs on `C:\\Projects\\Carbon` are kept.











RELATED LINKS

Disable-CAclInheritance

Get-CPermission

Grant-CPermission

Revoke-CPermission