# Filtering: Where-Object and Comparisons

Where-Object keeps only the objects that pass a test, such as every file over 1 MB or every song, and the test is written with comparisons read aloud as words, -eq "equals", -gt "greater than", -like "is like", with $\_ standing for this item.

![Cheat sheet for the lesson Filtering: Where-Object and Comparisons: Where-Object keeps only the objects that pass a test, such as every file over 1 MB or every song, and the test is written with comparisons read aloud as words, -eq "equals", -gt "greater than", -like "is like", with $\_ standing…](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/c4d2b90d8544475c9e7a4bc4e9cd1157.webp)

- Category: PowerShell
- Level: Apprentice
- Tags: and-psitem, byte, comparison-operators, operating-system, powershell, script-block, where-object
- Updated: November 10, 2026

Source: https://www.ask-codey.com/cheat-sheets/powershell-where-object-cheat-sheet
