Change NTFS permissions on all objects in a folder without using inheritance

Question:

I have a file share with approximately 500 folders and I am looking to make the NTFS permissions on all of the folders consistant.  However, I don’t want to change the root folder’s permissions to allow inheritance to it’s subfolders.  Is there a way to automate the process of changing ownership of all the folders in the share with using inheritance or do I manually have do it on each folder?

Solution:

1) Set Administrators on the root as FC
2) create dirs. folder above
3) run the command to turn off inheritance and copy: now, admins are FC on all
4) Open an excel spreadsheet
5) Put the DIR names into column B and D
6) put:xcacls.vbs c:\(rest of path, minus username) into A
7) put “/g domain\” into column C
8) put “:f” into E

So, if Bob is a user (and the DIR name)

xcacls.vbs c:\users\    bob    /g domain\    bob   :f

Drag/copy columns A / C / and E to fill out the spreadsheet for as many users as you have.

copy this, and paste into notepad

In notepad, do a search/replace so that there is no space between \users\ and bob,
and so that there is no space between domain\ adn bob and :f

(replace domain with your domain name of course)

save as .bat, and run.

Done!

digg delicious stumbleupon technorati Google live facebook Sphinn Mixx newsvine reddit yahoomyweb
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...