title: Powershell windows file share permissions. Add new users then replace all existing users?
body: <p>I've gotten comfortable using icacls to add people to file folders but now I am having trouble figuring out how to do the following: </p>
  
  <p>on a folder with many children, g</p>
  
  <ol>
  <li><p>get the existing permissions on the folder and store them</p></li>
  <li><p>Add a bunch of new users, propogating to all children and turning on inheritance, replace and force (already working from previous scripts) </p></li>
  <li><p>check the top level folder and remove any permissions not placed on in step 2. </p></li>
  <li><p>now that the parent folder has the correct permissions and all children have inheritance set, set all children to have the same permissions as the parent (recompute acl inheritance?) </p></li>
  </ol>
  
  <p>thanks for any help you all can provide, I just need a push to get into the right direction. </p>