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.
Not to rub salt in the wound, but if I recall correctly group-object has been around since PS1.0... Don't be embarrassed, I'm continuously finding out new things with/about PowerShell. IT is a continuous learning experience. Once you consider yourself an expert, you've already fallen behind.