Collections:
Other Resources:
"Where-Object" Cmdlet in Windows PowerShell
What is the "Where-Object" cmdlet in Windows PowerShell?
✍: FYIcenter.com
"Where-Object" cmdlet in Windows PowerShell takes an input of object list
and generate an output object list by filtering out objects with specific criteria.
Example 1: the following command uses "where-object" to filter out objects with a condition on a property:
PS C:\fyicenter> Get-Process | Where-Object CPU -gt 1000
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
262 13 120432 36732 291 8,659.91 916 dwm
3132 83 145168 67676 449 7,234.55 3344 explorer
1395 73 682352 267368 1538 9,249.25 4896 firefox
Example 2: the following command uses "where-object" to filter out objects with multiple conditions on properties:
PS C:\fyicenter> Get-Process
| Where-Object {($_.WS -gt (10000*1024)) -and ($_.CPU -gt 10)}
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
262 13 120432 36756 291 8,665.65 916 dwm
3129 83 145152 67944 449 7,235.44 3344 explorer
1397 73 688716 279216 1537 9,254.35 4896 firefox
869 21 64848 25800 266 50.51 3280 powershell
692 23 140136 26288 335 31.68 8528 powershell
⇒ "Get-Member" Cmdlet in Windows PowerShell
⇐ "Select-Object" Cmdlet in Windows PowerShell
2016-11-03, ∼5060🔥, 0💬
Popular Posts:
How to download and install Yahoo Toolbar for Internet Explorer (IE) 7 browser? Yahoo Toolbar adds s...
What is "Pml Driver HPZ12" in my Windows 7 service list? And how is "Pml Driver HPZ12" service relat...
What is the scheduled task "\Microsoft\Windows\WDI\ ResolutionHost"on my Windows 7 computer? "\Micro...
A new tab called "Boot" is added in "msconfig" tool on Windows Vista and Windows 7. What is this "Bo...
What is msdxm.ocx - Windows Media Player 2 ActiveX Control? msdxm.ocx is installed as an ActiveX Con...