set-acl
Verified for current stable LTS
Set Acl Command: Copy Security Descriptor Between Files
Use for copy security descriptor between files with Set Acl. Exact CLI syntax to copy security descriptor between files using Set Acl.
When to use this: Use for copy security descriptor between files with Set Acl.
Command Syntax
$OriginAcl = Get-Acl -Path <path\to\file>; Set-Acl -Path <path\to\file> -AclObject $OriginAcl $env:OriginAcl = Get-Acl -Path <path/to/file>; Set-Acl -Path <path/to/file> -AclObject $env:OriginAcl Live Command Builder
Final Command
$OriginAcl = Get-Acl -Path <path\to\file>; Set-Acl -Path <path\to\file> -AclObject $OriginAcl Command Breakdown
-Path- Command Option
- Tool-specific option used by this command invocation.
-AclObject- Command Option
- Tool-specific option used by this command invocation.
FAQ
Purpose: Exact syntax to copy security descriptor between files using Set Acl.
Test path: Replace placeholders and run destructive commands in a disposable workspace first.
Flag behavior: Tool version, platform, and shell can change behavior.
Improve This Command
Suggest a correction, safer default, or version-specific note for this entry.
Related Operations
Set Acl Command: Pass Descriptor Using Pipeline
Get-Acl -Path <path\to\file> | Set-Acl -Path <path\to\file> Get Acl Command: Get Acl Registry Key Windows Get-Acl -Path {HKLM:\System\CurrentControlSet\Control} | Format-List Add Appxpackage Command: Add App Package Windows Add-AppxPackage -Path <path\to\package.msix> Add Appxpackage Command: Add App Package With Dependencies Windows Add-AppxPackage -Path <path\to\package.msix> -DependencyPath <path\to\dependencies.msix> Add Appxpackage Command: Add Unsigned Package Windows Add-AppxPackage -Path <path\to\package.msix> -DependencyPath <path\to\dependencies.msix> -AllowUnsigned