Hello friends. I am having troubling posting the sample audit data (maybe too much text?).
$auditSample | Group-Object -Property IRNumber -NoElement | Sort-Object -Property Count -Descending
Count Name
----- ----
10 Not Found
10 Service Account
9 Local Admin Account
5 IR56242
3 Domain Admin
3 IR29068
1 IR44372
1 IR42115
1 IR27733
1 IR243582
1 IR243581
Trying to output:
$auditSample | Group-Object -Property IRNumber -NoElement | Sort-Object -Property Count -DescendingCount Name
10 Not Found
10 Service Account
9 Local Admin Account
5 IR56242
3 Domain Admin
3 IR29068
5 Unique IRs