Group-Object
SafeGroup and count
... | Group-Object <prop>
Counts items per value — file counts by extension, events by ID; instant distributions.
Examples
Get-WinEvent -LogName System -MaxEvents 500 | Group-Object Id | sort Count -descTop event IDs
Syntax
<cmd> | Group-Object <property> [-NoElement]
Before you run it
Read only.
Related commands
- Measure-ObjectCount and sum
- GROUP BYGroup and aggregate
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store