How to Export Folder Permissions to Excel or CSV File
Export NTFS Permissions to Spot Overexposure of Your Critical Data
The less data is exposed, the safer it is. To ensure that only eligible users have access to critical systems and data, you need to know their NTFS permissions include only what they need to do their jobs. One way to view a list of security permissions to files and shared folders on Windows servers in your network is to perform permissions reporting using Microsoft PowerShell. With the help of a PowerShell script, you can export folder permissions to a CSV file and open it in Excel, so you can spot users with unnecessary permissions, adjust those permissions to align with your data security policy, and thereby minimize the risk of a data breach. However, with this PowerShell permissions reporter option, be ready to spend some time on scripting and then looking through the mountains of data you get.
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:
$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.
https://img.netwrix.com/howtos/Folder-Permissions_450_2.png
Originally posted: https://www.netwrix.com/how_to_export_folder_permissions.html