locked
Export Folder Permissions uisng Power Shell RRS feed

  • Question

  • Hi All,

    I am using below procedure to Export the Permissions from the File Server 2012.

    This Command Works but create a Empty CSV File.

    $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"
    Tuesday, September 22, 2020 11:09 AM

All replies