Wednesday, October 26, 2011

Clone NTFS Permissions Fast with PowerShell

Need to clone NFTS permissions between two folders or files? The Get-Acl & Set-Acl commandlets provide this capability when used in conjunction with each other. With the one-liner below, you can transfer complex permissions from source to destination in seconds.
Set-Acl -path "\\\dept\target_directory" -aclObject (Get-Acl -path "\\\dept\source_directory")

No comments:

Post a Comment