Power shell cacls?

This topic contains 2 replies, has 3 voices, and was last updated by  Don Jones 2 years, 7 months ago.

  • Author
  • #32927


    What I am trying to figure out is a script to inject a security group / User to a list of folders within a directory. I have a directory (\\server\directory) under the directory I have 20 folders with various locations that I want Authenticated users to have read only access to just that level and not the sub folder. Is this possible? I am guessing it's a for each thing. I am new sorry if my questions are annoying just tired of doing each folder one at a time.

  • #32928

    Dave Wyatt

    There's nothing wrong with just using CACLS, if you're familiar with that and you have it available. PowerShell does have a Set-Acl cmdlet, but it requires you to fetch and modify the ACL object first, which can be somewhat complicated compared to the command line tools that were available before.

  • #32929

    Don Jones

    +1 to Dave. What's native – Get-ACL and Set-ACL – is complex and difficult to use. icacls.exe in particular is awesome and easy, and runs fine in PowerShell.

You must be logged in to reply to this topic.