Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

Piping Get-Acl output to icacls.exe

$
0
0

Hello everybody,

my first post here, I'm Luka and I hope to get more proficient with PS.

In a production environemnt, I have a messed up folder with inconsistent permissions. I was hoping to be able to get the files with the required group missing

Get-Acl | where {$_.accesstostring -notlike "*domain\Required_Group*"}

and piping the output to icacls

icacls /grant Required_Group:R

Well, I can't manage. I'm guessing the input format is not correct. I have also tried with the get-acl - set-acl combination but it requires me to change the owner of the files involved.

Any suggestions please?

Thanks, shkdd

 


Viewing all articles
Browse latest Browse all 8411

Latest Images

Trending Articles



Latest Images