Get-acl – is used to display the security properties of the files in that folder, it doesn’t seem to have a recursive switch. Get-childitem – is used to access the folders recursively, (-recurse <- recursive switch is needed to access subfolders as well)
Get-childitem \\fileshare\folder -recurse | get-acl | select-object path,owner,accesstostring,group | export-csv “C:\security.csv” (And orderly too, everything is arranged needly the moment you open the CSV file 🙂 )
It will get ACL security properties of the files and folder and subfolders (yes it works for network shares too!) of the destination you have specified and export the information into an Excel spreadsheet. Administrator access (you might get a access denied to some folders)