FIND YOUR NEXT FEW LINES
The snippet library.
Small, practical examples. Search by task or narrow things down below.
5 snippets foundClear filters
Count items by group
Group repeated values and report each count.
Group-Object✓ Tested
Filter items in a pipeline
Keep numbers that meet a condition.
Where-Object✓ Tested
Select object properties
Create a smaller object with only the fields you need.
Select-Object✓ Tested
Sort and deduplicate values
Produce an ordered list without duplicates.
Sort-Object✓ Tested
Sum a collection
Calculate a total with Measure-Object.
Measure-Object✓ Tested