Power shell cacls?

Welcome Forums General PowerShell Q&A Power shell cacls?

This topic contains 2 replies, has 3 voices, and was last updated by

 
Keymaster
3 years, 5 months ago.

  • Author
    Posts
  • #32927

    Participant
    Topics: 2
    Replies: 1
    Points: 0
    Rank: Member

    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

    Member
    Topics: 9
    Replies: 2322
    Points: 0
    Rank: Member

    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

    Keymaster
    Topics: 13
    Replies: 4872
    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    +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.

The topic ‘Power shell cacls?’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort