In a previous post in this series (see PowerCLI & vSphere statistics – Part 2 – Come together), I showed the usefulness of the Group-Object cmdlet when working with statistical data. The script in that post grouped data samples for each hour together, which made it much easier to calculate the hourly average. With the Group-Object cmdlet you avoid numerous nested if- or switch-statements.
And best of all, you don’t have to code the grouping yourself, it was all done for you by the PowerShell Team.
So make sure this cmdlet belongs to your basic PowerShell repertoire. It will prove invaluable when processing statistical data.
This post will show you several of the different options you have to group statistical data together. And I will illustrate each of these with a sample script.
Continue reading PowerCLI & vSphere statistics – Part 4 – Grouping