Skip to content

Enable‑NTFSItemInheritance

raandree edited this page Sep 6, 2026 · 1 revision

SYNOPSIS

Enables NTFS inheritance for files and directories.

SYNTAX

Path (Default)

Enable-NTFSItemInheritance [-Path] <String[]> [-Section <String>] [-RemoveExplicitRules]
 [-ThrottleLimit <Int32>] [-PassThru] [-WhatIf] [-Confirm]
 [<CommonParameters>]

LiteralPath

Enable-NTFSItemInheritance -LiteralPath <String[]> [-Section <String>] [-RemoveExplicitRules]
 [-ThrottleLimit <Int32>] [-PassThru] [-WhatIf] [-Confirm]
 [<CommonParameters>]

SecurityDescriptor

Enable-NTFSItemInheritance -SecurityDescriptor <PSObject> [-Section <String>] [-RemoveExplicitRules]
 [-ThrottleLimit <Int32>] [-PassThru] [-WhatIf] [-Confirm]
 [<CommonParameters>]

DESCRIPTION

Removes protection from the selected access or audit ACL so that the item can inherit rules from its parent directory.

EXAMPLES

EXAMPLE 1

Get-ChildItem -LiteralPath C:\Data | Enable-NTFSItemInheritance

Enables access-rule inheritance for each child item in C:\Data.

PARAMETERS

-LiteralPath

One or more filesystem paths used exactly as supplied. FileSystem objects bind to this parameter through their PSPath property.

Type: String[]
Parameter Sets: LiteralPath
Aliases: PSPath

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-PassThru

Returns the updated inheritance state for each changed item.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Path

One or more filesystem paths. Wildcards are expanded by the FileSystem provider, and path strings can be supplied through the pipeline.

Type: String[]
Parameter Sets: Path
Aliases: FullName

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: True

-RemoveExplicitRules

Removes explicit rules from each selected ACL before inheritance is enabled. Inherited rules from the parent are unaffected.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Section

Selects access inheritance, audit inheritance, or both. Changing audit inheritance can require SeSecurityPrivilege.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: Access
Accept pipeline input: False
Accept wildcard characters: False

-SecurityDescriptor

A WindowsAccessControl.SecurityDescriptor object returned by Get-NTFSItemSecurityDescriptor with the selected sections loaded. When supplied, inheritance is enabled on the descriptor in memory and the descriptor is returned; nothing is written until Set-NTFSItemSecurityDescriptor persists it.

Type: PSObject
Parameter Sets: SecurityDescriptor
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-ThrottleLimit

Limits concurrently processed canonical paths. One requests deterministic sequential execution.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: [Math]::Max(1, [Math]::Min(8, [Environment]::ProcessorCount))
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

System.IO.FileSystemInfo

WindowsAccessControl.SecurityDescriptor

OUTPUTS

None

WindowsAccessControl.Inheritance

WindowsAccessControl.SecurityDescriptor

NOTES

RELATED LINKS

Home

Commands

DSC resources

Clone this wiki locally