Collections:
Other Resources:
"Select-Object" Cmdlet in Windows PowerShell
What is the "Select-Object" cmdlet in Windows PowerShell?
✍: FYIcenter.com
"Select-Object" cmdlet in Windows PowerShell takes an input of object list
and generate an output object list by filtering out objects and/or
modifying some object properties.
Example 1: the following command uses "select-object" to take a subset of a Process object list:
PS C:\fyicenter> get-process | sort-object -property cpu | select-object -last 5
Handles NPM(K) PM(K) WS(K) VM(M) CPU(s) Id ProcessName
------- ------ ----- ----- ----- ------ -- -----------
301 15 15148 8940 131 33.21 2512 taskhost
536 19 56092 30584 246 37.80 3280 powershell
3085 81 141904 82144 450 7,158.96 3344 explorer
274 16 165764 143244 380 8,573.96 916 dwm
1442 79 681932 306356 1538 9,216.63 4896 firefox
Example 2: the following command uses "select-object" to show specific properties in each Process object in the list:
PS C:\fyicenter> get-process taskhost | select-object -property CPU,ID,Name,VirtualMemorySize,UserProcessorTime,MainModule | format-list CPU : 33.4466144 Id : 2512 Name : taskhost VirtualMemorySize : 137695232 UserProcessorTime : 00:00:15.9433022 MainModule : System.Diagnostics.ProcessModule (taskhost.exe) CPU : 0.0780005 Id : 5132 Name : taskhost VirtualMemorySize : 64598016 UserProcessorTime : 00:00:00 MainModule :
⇒ "Where-Object" Cmdlet in Windows PowerShell
⇐ "Sort-Object" Cmdlet in Windows PowerShell
2016-11-03, ∼6231🔥, 0💬
Popular Posts:
Can I disable Windows service "McAfee Framework Service" to speedup my computer? Third party service...
Can I disable Windows service "PCAngel.exe - PC Angel" to speedup my computer? Windows service "PCAn...
How programs are added to the startup application list? There are 3 main ways in which programs are ...
What is "Lenovo Hotkey Client Loader" in my Windows 7 service list? And how is "Lenovo Hotkey Client...
What is the scheduled task "\G2MUpdateTask-S-1-5-21 -..."on my Windows 7 computer? "\G2MUpdateTask-S...