ACL Permissions to CSV
Zitat von mpca am 26. Februar 2021, 23:00 Uhrcommunity.spiceworks.com/how_to/153688-h...f-folder-permissions
Step 1: Open the Powershell ISE
Open the Powershell ISE → Create a new script using the following code:Step 2: Script Code
$path = "\\pdc\Shared\Accounting" #define path to the shared folder
$reportpath ="C:\data\ACL.csv" #define path to export permissions report
#script scans for directories under shared folder and gets acl(permissions) for all of them
dir -Recurse $path | where { $_.PsIsContainer } | % { $path1 = $_.fullname; Get-Acl $_.Fullname | % { $_.access | Add-Member -MemberType NoteProperty '.\Application Data' -Value $path1 -passthru }} | Export-Csv $reportpath
community.spiceworks.com/how_to/153688-h...f-folder-permissions
Step 1: Open the Powershell ISE
Open the Powershell ISE → Create a new script using the following code:
Step 2: Script Code
$path = "\\pdc\Shared\Accounting" #define path to the shared folder
$reportpath ="C:\data\ACL.csv" #define path to export permissions report
#script scans for directories under shared folder and gets acl(permissions) for all of them
dir -Recurse $path | where { $_.PsIsContainer } | % { $path1 = $_.fullname; Get-Acl $_.Fullname | % { $_.access | Add-Member -MemberType NoteProperty '.\Application Data' -Value $path1 -passthru }} | Export-Csv $reportpath