Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Copy permissions and add recursively via Powershell
- Usefull when you need to apply the same permissions to all subfolders and items and get error trying to do it via the GUI in Windows.
- Run Powershell as admin.
- ```powershell
- $acl = Get-Acl "C:\Path-To-Object-To-Copy-Permissions-From"
- $items = Get-ChildItem "D:\Parent-Folder-Containing-All-Objects-To-Apply-Permissions-To" -Recurse
- foreach ($i in $items) { Set-Acl -Path $i.FullName -AclObject $acl }
- ```
Add Comment
Please, Sign In to add comment