Get folder permissions recursive
To view which user or group has access to a folder structure you must check this per folder.
Fortunately powershell has (ofcourse) the option to recursive check a folder structure and display the result in a nice textfile. The oneliner for this is:
1 |
Get-ChildItem -Recurse | where-object {($_.PsIsContainer)} | get-acl | format-list path,accesstostring > c:\permissions.txt |
You can use the get-acl command to display the effective permissions on a folder. This commandlet does not have the option to recursive go trough the entire folderstructure. Get-Childitem has this option and when you pipe it trough get-acl you get the list you want.
The where-object {($_.PsIsContainer)} is used to only display folders and not files.