liveBook · Manning

Where-Object

Where-Object is a PowerShell cmdlet that filters pipeline objects according to specified properties, conditions, or criteria.

How 2 Manning books explain it

Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

Where-Object is a PowerShell cmdlet that filters objects in the pipeline according to specified criteria.

How it is used
Filters retrieved pipeline objects when an upstream cmdlet cannot express all required criteria.
How deep it goes
Explains per-object evaluation, comparison syntax, $_, nested pipelines, property names, and iterative construction without descending into implementation internals.
Examples
Demonstrates process, file, module, date, event-log, regex, and nested-content filters.
What you can do after
Apply it via PowerShell pipelines to retain objects matching property comparisons, wildcard tests, compound conditions, or regular expressions.

Read how Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS explains Where-Object →

Practical Automation with PowerShell: Effective scripting from the console to the cloud

Where-Object is a PowerShell cmdlet that filters objects in a pipeline according to a specified condition.

How it is used
Filters pipeline objects for operational selection, while steering source-level filtering when available for efficiency.
How deep it goes
Explains pipeline-by-pipeline filtering costs and demonstrates property conditions in disk and VHD automation.
Examples
Demonstrates filtering SQL results, locating a VHD by Path, selecting raw disks, and limiting a file watcher to XML files.
What you can do after
Apply it to select pipeline objects by properties while choosing earlier cmdlet or SQL filters for high-volume retrieval.

Read how Practical Automation with PowerShell: Effective scripting from the console to the cloud explains Where-Object →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.