profit10 Posted September 16, 2014 Posted September 16, 2014 Hi Guys, I would like to copy the permissions of a directory and anything within it to several other directories of the same name located on different machines. I don't want to copy the directory itself, or the contents as they differ between machines. I just want the same permissions. Is this possible as I haven't found anything that seems to do this? Any help would be great. Thanks.
pleach85 Posted September 16, 2014 Posted September 16, 2014 I've used powershell for this before, not sure how it would handle subfolders but you could probably script it using get-childitem get-acl $folderToGetPermissionsFrom | set-acl $FoldertoSetPermissionsOn
profit10 Posted September 16, 2014 Author Posted September 16, 2014 Thanks but I have never used powershell before...not a clue what I would do with that. Any way to do it with a command line?
pleach85 Posted September 16, 2014 Posted September 16, 2014 You could use icacls, it wouldn't allow you to copy and paste permissions but you could certainly create a bat script which will set permissions you want a folder and then set that script to run on all the computers. It is quite a powerful cmd though and I would recommend lots of testing first. If you've never used it before Managing Permissions from the Command Line might be an article worth reading, it's afew years old but will give you an overview of the cmd so you can see if it's suitable.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now