PowerTip: Use PowerShell to See Who Can Access Folder


Summary: Use Windows PowerShell to see who has access to a folder.

Hey, Scripting Guy! Question How can I use Windows PowerShell to see who has access rights to a folder?

Hey, Scripting Guy! Answer Use the Get-Acl cmdlet, specify the folder, and look at the access property, for example:

(Get-Acl c:\fso).Access

 

Comments (4)

  1. Note that Get-Acl doesn’t work recursively. This handy trick will do it for all folders inside your current location:

    PS> Get-ChildItem . -Recurse -Directory | Get-Acl | Select @{Name=’Path’;Expression={Convert -Path $_.Path}},Owner,AccessToString |fl

  2. Clint Wills says:

    Great script, It’s nice to to see who has access to a folder. I used automate file access auditing tool (
    http://www.fileaccessauditing.com/ ) that allows to audit all access events on files or folders and enables the real-time event monitoring to know the access events generated on this server and assists to get
    all the required the complete information for each change without wasting any time.

  3. Very useful information. Thank you.

  4. ThmsRynr says:

    I wrote a post that uses this principle to get (IMO) more useful/complete information:

    https://sysjam.wordpress.com/2014/10/03/whos-got-access-to-this-directory/

Skip to main content