Loading..
  • Lets work together

    Onsite or Remote Support

  • M-F 9:00 am - 5:00 pm

    Call (519) 573-3759

How to Export Folder Permissions to Excel or CSV File

Posted ByTeam Lead
  1. Open the Powershell ISE → Create a new script using the following code → Specify the path to the folder of interest and where the result must be exported:
  2. $FolderPath = dir -Directory -Path "\\fs1\Shared" -Recurse -Force

    $Report = @()

    Foreach ($Folder in $FolderPath) {

        $Acl = Get-Acl -Path $Folder.FullName

        foreach ($Access in $acl.Access)

            {

                $Properties = [ordered]@{'FolderName'=$Folder.FullName;'AD

    Group or

    User'=$Access.IdentityReference;'Permissions'=$Access.FileSystemRights;'Inherited'=$Access.IsInherited}

                $Report += New-Object -TypeName PSObject -Property $Properties

            }

    }

    $Report | Export-Csv -path "C:\data\FolderPermissions.csv"


    2.- Run the script.

    3.- Open the file produced by the script in MS Excel.