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 and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store