Script to apply permissions for a user/group on a folder structure with inheritance and EXCLUDE one folder RRS feed

  • Question

  • This is my env structure

    Can somebody help me to write down a script for the following purpose.

    I have above folder structure as per screenshot added and re-iterating it below as well.



    \\Server1\users\users3\unix.... and so on

    The most important point is "unix" is residing at the same level in each user's directory.

    My requirement is:

    1. I want to apply permissions for a security group on all the users directories listed under "\\Server1\users\..." but want to exclude "unix" folder as I do not want to play with permissions of unix folder.

    2. The security group (to whom we will provide access) should have access on complete user's profile with inheritance enabled but just "EXCLUDE" the unix folder.

    I have more than 2000 user profiles listed under parent folder so I need a script which can do this job in one go for all the profiles by giving the parent path (which is "\\Server1\users\.." in this example).

    I am not expert writing of such script and need help from an expert here. Any help will be highly appreciable.


    Aman Gupta

    • Moved by Bill_Stewart Thursday, December 13, 2018 3:21 PM This is not "scripts on demand"
    Wednesday, September 19, 2018 2:14 PM