Get or Set-ACL vs ???

by i255d at 2013-02-12 09:57:34

I recently posted "Copy directory structure with access permissions" which seemed to work out pretty well, but during the conversation, someone mentioned that using PowerShell for permissions is the wrong tool for the job. He suggested that I create a post and see what you guys come up with for a way of copying a large directory structure and then the best tool for duplicating the permissions. I didn’t want the data.
by poshoholic at 2013-02-12 10:25:45
I know I see people suggest icacls a lot for managing permissions. PowerShell’s support for security descriptors and access control lists definitely leaves something to be desired. However, I believe it works well for the post you are referring to so I wouldn’t necessarily go so far as to say it’s the wrong tool for the job. I think it depends on what you are trying to do. In scenarios where you want to modify permissions by changing an individual access control entry, perhaps replacing one user with another, or adding one user where another one already has permissions, that sort of thing, then you might find PowerShell’s Get-Acl and Set-Acl leave you wanting much more.
by mjolinor at 2013-02-12 10:37:53
I’ve seen RoboCopy suggested for duplicating directory structures and their permissions:

robocopy "source" "destination" /e /z /SEC /xf *
by Slashj at 2013-02-22 01:23:19
In your case… if im understanding this correct… ur task should be to just copy all the folders into another directory with another "root"-path

like your whole structure lies in "C:\1" and you want to copy the whole structure into "C:\2".

afterwards u go through all "1" subfolders get the acl and set it on the same named folder in your "2" structure.

Am i missing something?
Cause if not, then this is easily done with the PoSh in my opinion.

Br