A few years ago I wrote a PowerShell function to create an Excel-like pivot table in a PowerShell console. The other day I decided to revisit the function. I was surprised that it didn't really need too much updating but I did spend some time updating the documentation and adding one new feature.
Manage and Report Active Directory, Exchange and Microsoft 365 with
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
The function now allows you to sort your results. This is especially handy when creating a table with Count or Sum values. You can sort on the value or the property name.
I also turned the function into a module, added an alias and published it to my GitHub repository. I hope you'll let me know what you think and especially how you end up using it.
Thanks for sharing this. I’ve been using SQL pivot tables in a project lately and this might come in handy.
This has already proven quite useful. Thank you!