Files
scripts/PowerShell/List file access.ps1
2023-05-23 17:02:39 +02:00

11 lines
465 B
PowerShell

get-Acl -Path C:\users\* | out-gridview
$FolderPath = Get-ChildItem -Directory -Path "C:\users\*"
ForEach ($Folder in $FolderPath) {
$Acl = Get-Acl -Path $Folder.FullName
ForEach ($Access in $Acl.Access) {
$Properties = [ordered]@{'Folder Name'=$Folder.FullName;'Group/User'=$Access.IdentityReference;'Permissions'=$Access.FileSystemRights;'Inherited'=$Access.IsInherited}
New-Object -TypeName PSObject -Property $Properties
Out-GridView }
}