Where-Object
SafeFilter objects
... | Where-Object {条件}
The pipeline filter. Short form '?' with simplified syntax combines with nearly everything.
Examples
Get-Service | ? Status -eq 'Stopped'Only stopped services
Syntax
<cmd> | Where-Object {$_.Prop -eq value} / ? Prop -eq value
Before you run it
Read only.
Related commands
- Select-ObjectPick properties/rows
- Sort-ObjectSort objects
- Get-ServiceServices (PS)
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store