Friday 21 June 2013

Powershell Command to Extract ACL Information and Continue on Error

Sometimes it can be handy to have a drill down through a foldr structure and check who can access what. The following scripts will dig out the name of the owner and the type of Access available to them.

Powershell command to extract the Account Control List information from all the objects in a particular folder:

get-childitem "C:\robotfolders" | %{ get-acl $_.FullName }

Powershell command to extract the Account Control List information from all the objects in a particular folder and all the child items of that folder:

get-childitem "C:\robotfolders" -recurse | %{ get-acl $_.FullName }

Powershell command to extract the Account Control List information from all the objects in a particular folder and all the child items of that folder and then output the information into a CSV file:

get-childitem "C:\robotfolders" -recurse | %{ get-acl $_.FullName }| export-csv "C:\acl_p.csv"

No comments:

Post a Comment