PowerShell: Get Permissions of Folders Within Parent Folder

The below PowerShell code will return the folder permissions of just the folders within the specified folder. We needed a way to list security groups that have access to a file servers shared folders and this was an easy way to dump all security groups with access. I’ve customized the output of the results to only display the folder name/path, owner, and the groups who have access. To display all properties remove the Format-List section between the pipes |.

Get Folder Permissions
Get-Childitem E:\SharedFolder\ | Where-Object {($_.PsIsContainer)} | Get-ACL | Format-list Path, Owner, AccessToString | Out-File C:\dump\FolderPermissions.csv