Scripting Windows Platform

Powershell NTFS Permissions & Access Reports

Use this script if you need an NTFS Permissions & Access Reports or you need to get a list of folder and files permissions in minutes. This script is Fast & simple. Export permissions list to CSV.  This tool can be used as a reporting tool to see who has access to files and folders.  Use this script to track permission assigned to a directory and ensure these settings are compliant with your policies

$FolderPath = dir -Directory -Path “\\audain\myfolder” -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:\temp\FolderPermissions.csv”