PowerShell Group-Object: Group By, Count and Sum (7 vs 5.1)
If you need to count how many orders came from each state, the PowerShell Group-Object cmdlet does it in one line: Import-Csv .\orders.csv | Group-Object -Property State -NoElement. You get one row per state with a Count column. In this tutorial, I’ll show you how PowerShell Group-Object works on one small orders file, from a … Read more