Okay so I want to have the read and write permissions for users on a fileserver to be exported in CSV format.
With the script below am not getting all of the subfolders on Powershell ISE
Can someone help to add some code, the content in folders is not so important I want to keep the read and write permissions only
$FolderPath = dir -Directory -Path "D:" -Recurse -Force $Report = @() Foreach ($Folder in $FolderPath) { $Acl = Get-Acl -Path $Folder.FullName foreach ($Access in $acl.Access) { $Properties = [ordered]@{'FolderName'=$Folder.FullName;'AD Group or User'=$Access.IdentityReference;'Permissions'=$Access.FileSystemRights;'Inherited'=$Access.IsInherited} $Report += New-Object -TypeName PSObject -Property $Properties } } $Report | Export-Csv -path "C:\data\FolderPermissions.csv"