Clone NTFS Permissions

I have done this before when moving log file locations in Exchange and it’s well cool and make life very easy!


Source: http://powershell.com/cs/blogs/tips/archive/2009/03/24/clone-ntfs-permissions.aspx

NTFS access permissions can be complex and tricky. To quickly assign NTFS permissions to a new folder, you can simply clone permissions from another folder that you know has the correct permissions applied.

md $homesample
# manually assign correct permissions to folder “sample”
$sddl = (Get-Acl $homesample).Sddl
md $homenewfolder
$sd = Get-Acl $homenewfolder
$sd.SetSecurityDescriptorSddlForm($sddl)
$sd.Sddl
Set-Acl $homenewfolder $sd

Unfortunately, setting ACLs this way always requires administrator privileges.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.