Question:
I’m trying to find all folders which do not inherit permissions.
This seems to work, sorta:
1 2 |
DIR "C:\temp" -directory -recurse | GET-ACL | select -ExpandProperty Access | ? -property IsInherited -eq $false |
…but it leaves out the actual folder name.
How do I include folder names in the final output? It gets a little tricky for me because I need to filter on a property on an object (Access) within an object (whatever GET-ACL
returns).
Any ideas?
Answer:
Scratch that, I’m an idiot.
1 2 |
DIR "C:\temp" -directory -recurse | GET-ACL | where {$_.Access.IsInherited -eq $false} |