Group permissions for specific folders
hi guys ! hope me.
here's thing. in company, on server, have folder named "customers folders". inside folder, there folders of customer have (around 700). inside customers folders, there subfolders of our departments, dfi, dpe etc..
we need apply read/write permissions on department subfolders inside customers folders. e.g.: apply permissions dfi group on dfi subfolders inside customers folders, automatically.
is possible ?
thank you
ps: sorry english. not first language
this little tricky, made easier if know ahead of time folder names departments be. you'd have use script automate it, , if it's regular thing invest time set up.
the below article should give pointer start
https://blogs.technet.microsoft.com/heyscriptingguy/2014/11/22/weekend-scripter-use-powershell-to-get-add-and-remove-ntfs-permissions/
i'm not expert on scripting rough idea of logic might go little this:
- get list of root customer folders array/hashtable - you'll want iterate through each of these dealing 1 @ time
- find folders match department name(s) (into array/hashtable iterate though) want apply permissions on, may need use if statement "if folder name = accounting apply permissions group accounting" using powershell code of course
- use add-ntfsaccess cmdlet set permission, move onto next department. if there's 1 department you'lll moving onto next root customer folder , on.
you'll need correct commands i've not done via script before, if don't know ps learn - trying best it's important.
and gods sake, test test test in isolated environment, not test script on live folders. create dozen or blank customer folders , emulate folder structure.
also, can use ps list of customer folders , folders within each folder , believe can specify how many levels deep want recurse, spit out text file or csv can examine full structure first.
Windows Server > File Services and Storage
Comments
Post a Comment