Press "Enter" to skip to content

Measure-Object in Powershell

Patrick Gruenauer counts the ways:

The Measure-Object cmdlet counts objects. But it can do even more. We can calculate the sum, the average and much more. In this blog post I show a few examples with Measure-Object. Let’s dive in.

It’s a fairly straightforward cmdlet but it has a lot of use, being a combination of something like wc in Linux as well as collecting basic statistics on objects.