How to Get ACL for a Folder

source: https://www.netwrix.com/how_to_get_acl_for_a_folder.html

NATIVE AUDITINGNETWRIX AUDITOR FOR WINDOWS FILE SERVERS

  1. Open the Powershell ISE → Create a new script using the following 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

  1. Specify the path to the folder of interest and where the results should be saved.
  2. Run the script.
  3. Open the file produced by the script in Microsoft Excel.
Microsoft Excel file produced by the PowerShell script

Use Windows PowerShell ISE

For install https://www.winsysadminblog.com/2012/05/installing-the-powershell-ise-integrated-scripting-environment-on-windows-server-2008-r2/


Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *

Questo sito usa Akismet per ridurre lo spam. Scopri come i tuoi dati vengono elaborati.