Where-Object
Where-Object is a PowerShell cmdlet that filters pipeline objects according to specified properties, conditions, or criteria.
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.
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.
Related concepts
- monitoringuses · Monitoring is the ongoing observation and measurement of a system or process to assess its behavior or condition and detect changes, failures, or other problems.
- aliasalternative to · An alias is an alternative name by which an entity, command, parameter, or resource can be referred to.
- cmdletkind of · A cmdlet is a specialized PowerShell command, typically implemented as a .NET class, that performs a focused operation.
- filteringkind of · Filtering is the selection or exclusion of data or items according to specified criteria.
Questions about Where-Object
What is Where-Object?
Where-Object is a PowerShell cmdlet that filters pipeline objects according to specified properties, conditions, or criteria.
Which Manning books explain Where-Object?
Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS and Practical Automation with PowerShell: Effective scripting from the console to the cloud.
What is the difference between Where-Object and alias?
Where-Object is a PowerShell cmdlet that filters pipeline objects according to specified properties, conditions, or criteria. An alias is an alternative name by which an entity, command, parameter, or resource can be referred to.
What is Where-Object a kind of?
Where-Object is a kind of cmdlet. A cmdlet is a specialized PowerShell command, typically implemented as a .NET class, that performs a focused operation.
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.

