Skip to content

Copy‑NTFSItemSecurityDescriptor

raandree edited this page Sep 6, 2026 · 1 revision

SYNOPSIS

Copies selected NTFS security descriptor sections.

SYNTAX

Path (Default)

Copy-NTFSItemSecurityDescriptor -SourceLiteralPath <String> [-Path] <String[]>
 [-Sections <AccessControlSections>] [-ThrottleLimit <Int32>] [-PassThru] 
 [-WhatIf] [-Confirm] [<CommonParameters>]

LiteralPath

Copy-NTFSItemSecurityDescriptor -SourceLiteralPath <String> -LiteralPath <String[]>
 [-Sections <AccessControlSections>] [-ThrottleLimit <Int32>] [-PassThru] 
 [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Copies only the requested owner, group, DACL, or SACL sections from one source item to one or more destination items. Other sections are preserved.

EXAMPLES

EXAMPLE 1

Get-ChildItem C:\Target | Copy-NTFSItemSecurityDescriptor -SourceLiteralPath C:\Template -Sections Access

Copies the template DACL to each child item under C:\Target.

PARAMETERS

-LiteralPath

One or more destination 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 each destination security descriptor after the copy completes.

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 destination 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

-Sections

Selects the descriptor sections copied to each destination item.

Type: AccessControlSections
Parameter Sets: (All)
Aliases:
Accepted values: None, Audit, Access, Owner, Group, All

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

-SourceLiteralPath

The literal filesystem path whose selected descriptor sections are copied.

Type: String
Parameter Sets: (All)
Aliases:

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

-ThrottleLimit

Limits concurrently processed canonical destinations. 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

OUTPUTS

None

WindowsAccessControl.SecurityDescriptor

NOTES

RELATED LINKS

Home

Commands

DSC resources

Clone this wiki locally