GroupBy Parameter (Select-Excel Cmdlet)
A comma-separated list of columns that the result set will be grouped by.
Syntax
Select-Excel -GroupBy string
Remarks
The comma-separated list of columns to aggregate the values of and execute a summary function over. Specify the summary function in the Columns parameter with the same syntax you would use for an SQL statement. For example:
Select-Excel -Connection $conn -Table Sheet -Columns @("LastName","SUM(AnnualRevenue)") -GroupBy "LastName" -Where "FirstName <> 'Bob'"