PowerShell: Process List

To get process list:

Get-Process
# or
ps

To get process list and sort by CPU (ascending):

Get-Process | Select-Object -Property CPU
# or
ps | sort -p cpu

To get process list sorted by CPU (ascending) and get last 10 results:

Get-Process | Select-Object -Property CPU | Select-Object -Last 10
# or
ps | sort -p cpu | select -l 10

To get process list and sort by CPU (descending):

Get-Process | Select-Object -Property CPU -Descending
# or
ps | sort -p cpu -d

To get process list sorted by CPU (desceding) and get first 10 results:

Get-Process | Select-Object -Property CPU -Descending | Select-Object -First 10
# or
ps | sort -p cpu -d | select -f 10

To get usage (CPU, Memory, Network, Disk):

Get-Counter

References:


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *