-
Notifications
You must be signed in to change notification settings - Fork 0
/
ParseAclResult.ps1
18 lines (14 loc) · 1.17 KB
/
ParseAclResult.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Import the CSV file generated by adaclscan
$scanResults = Import-Csv -Path "C:\Temp\Test_ACL_20231031.csv"
# Filter the results to show only entries with "AccessDenied" in the "Access" column
$accessAllowDelete = $scanResults | Where-Object { ($_.Access -eq "Allow") -and ($_.Permission -like "Delete*") }
$accessAllowWrite = $scanResults | Where-Object { ($_.Access -eq "Allow") -and ($_.Permission -like "Write*") }
$accessAllowValidated = $scanResults | Where-Object { ($_.Access -eq "Allow") -and ($_.Permission -like "*Validated*") }
$accessAllowFullControl = $scanResults | Where-Object { ($_.Access -eq "Allow") -and ($_.Permission -eq "Full Control") }
$accessAllowPassword = $scanResults | Where-Object { ($_.Access -eq "Allow") -and ($_.Permission -like "*Password*") }
# Group the results by the "Path" column and count the number of entries in each group
$groupedResults = $accessDenied | Group-Object -Property Path | Select-Object Name, Count
# Sort the results by the number of entries in each group, in descending order
# $sortedResults = $groupedResults | Sort-Object -Property Count -Descending
# Output the results to the console
$sortedResults | Format-Table -AutoSize