How to Copy ACL Permissions For Folders, Using Powershell
Problem:
I needed the permissions on folder B to be exactly what they were on folder A.
Solution
Powershell’s Get-Acl
and Set-Acl
commands can be conveniently piped together.
So to copy permissions from C:\Folder1 to C:\Folder2, the following one-liner would do the trick:
Get-Acl -Path C:\Folder1 | Set-Acl -Path C:\Folder2
Happy scripting!
Leave a comment