No estoy seguro si te sirva este script de powershell (recuerda cambiar la política de ejecución de powershell con el comando Set-ExecutionPolicy unrestricted
):
$OutFile = "C:\temp\Permissions.csv"
$Header = "Folder Path,IdentityReference,AccessControlType,IsInherited," +
"InheritanceFlags,PropagationFlags,FileSystemRights"
Add-Content -Value $Header -Path $OutFile
$RootPath = "C:\Users"
$Folders = dir $RootPath -recurse | where {$_.psiscontainer -eq $true}
foreach ($Folder in $Folders){
$ACLs = get-acl $Folder.fullname | ForEach-Object { $_.Access }
Foreach ($ACL in $ACLs){
$OutInfo = $Folder.Fullname + "," + $ACL.IdentityReference + "," +
$ACL.AccessControlType + "," + $ACL.IsInherited + "," +
$ACL.InheritanceFlags + "," + $ACL.PropagationFlags + "," +
$ACL.FileSystemRights
Add-Content -Value $OutInfo -Path $OutFile
}}
Este es un ejemplo de los valores CSV que obtendrás al ejecutar el script, cargalos en Excell para ver si es lo que necesitas:
Folder Path,IdentityReference,AccessControlType,IsInherited,InheritanceFlags,PropagationFlags,FileSystemRights
C:\Users\Administrator,NT AUTHORITY\SYSTEM,Allow,False,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Administrator,BUILTIN\Administrators,Allow,False,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Administrator,AMAZONA-D7VQCIE\Administrator,Allow,False,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Public,CREATOR OWNER,Allow,False,ContainerInherit, ObjectInherit,InheritOnly,FullControl
C:\Users\Public,NT AUTHORITY\BATCH,Allow,False,None,None,CreateFiles, AppendData, ReadAndExecute, Synchronize
C:\Users\Public,NT AUTHORITY\BATCH,Allow,False,ContainerInherit, ObjectInherit,InheritOnly,DeleteSubdirectoriesAndFiles, Modify, Synchronize
C:\Users\Public,NT AUTHORITY\INTERACTIVE,Allow,False,ContainerInherit, ObjectInherit,InheritOnly,DeleteSubdirectoriesAndFiles, Modify, Synchronize
C:\Users\Public,NT AUTHORITY\INTERACTIVE,Allow,False,None,None,CreateFiles, AppendData, ReadAndExecute, Synchronize
C:\Users\Public,NT AUTHORITY\SERVICE,Allow,False,ContainerInherit, ObjectInherit,InheritOnly,DeleteSubdirectoriesAndFiles, Modify, Synchronize
C:\Users\Public,NT AUTHORITY\SERVICE,Allow,False,None,None,CreateFiles, AppendData, ReadAndExecute, Synchronize
C:\Users\Public,NT AUTHORITY\SYSTEM,Allow,False,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Public,BUILTIN\Administrators,Allow,False,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Administrator\Contacts,NT AUTHORITY\SYSTEM,Allow,True,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Administrator\Contacts,BUILTIN\Administrators,Allow,True,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Administrator\Contacts,AMAZONA-D7VQCIE\Administrator,Allow,True,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Administrator\Desktop,NT AUTHORITY\SYSTEM,Allow,True,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Administrator\Desktop,BUILTIN\Administrators,Allow,True,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Administrator\Desktop,AMAZONA-D7VQCIE\Administrator,Allow,True,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Administrator\Documents,NT AUTHORITY\SYSTEM,Allow,True,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Administrator\Documents,BUILTIN\Administrators,Allow,True,ContainerInherit, ObjectInherit,None,FullControl
C:\Users\Administrator\Documents,AMAZONA-D7VQCIE\Administrator,Allow,True,ContainerInherit, ObjectInherit,None,FullControl
Me cuentas si te sirve.