I’m looking to be able to query a data source (Active Directory though any other should suffice), where I pull in the values in a property, and also calculate how many occurrences of each value are present in that list.
So assuming AD Users:
I want to say something like Get-ADUser -filter * -property title | select-object title -unique | “magic happens here”
And get a result like:
Any ideas? I tried "for-each"ing the unique list back into a retrieval from AD in a subexpression and then pulling out a count, but PowerShell just kept laughing and laughing at me.