This specific requirement came to me when there was a file server migration.
having thousands of shared paths with different sets of permissions was an issue before we moved into DFS and this little script saved my time.
$path = Read-host “Enter a UNC Path: ”
write-host
"File Sharing Permissions Report - $path"
Write-Host
$acl = Get-Acl $path
Write-Host "File/NTFS Permissions"
Write-Host
foreach($accessRule in $acl.Access)
{
Write-Host " * " $accessRule.IdentityReference $accessRule.FileSystemRights
}
