Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 1.0 » Where-Object

Where-Object - Powershell 1.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Where-Object

Description
Filter the objects passed along the command pipeline.

Usage


Options


Example(s)
Get a list of all services that are currently stopped:

PS C:\>get-service | where-object {$_.Status -eq "Stopped"}

Lists the processes with a working set greater than 25000K. (bytes = Kilobytes*1024):

PS C:\>get-process | where-object {$_.workingset -gt 25000*1024}

Get the processes with a ProcessName property that begins with the letter p. The -match operator enables you to use regular expressions:

PS C:\>get-process | where-object { $_.ProcessName -match "^p.*" }