Use PowerShell to get processes greater than 1000 CPU(s) on remote server

Find out which processes are consuming 1 second CPU time.

Invoke-Command -ComputerName win2k8-01 -ScriptBlock { Get-Process | Where CPU -gt 1000 } -ErrorAction SilentlyContinue | Sort CPU -Descending | Format-Table -AutoSize
PS C:\WINDOWS\system32> Invoke-Command -ComputerName win2k8-01 -ScriptBlock { Get-Process | Where CPU -gt 1000 } -ErrorAction SilentlyContinue | Sort CPU -Descending | Format-Table -AutoSize

Handles NPM(K)  PM(K)  WS(K)    CPU(s)   Id SI ProcessName PSComputerName
------- ------  -----  -----    ------   -- -- ----------- --------------
   3395     35  28688  37512 14,120.66  504    lsass       win2k8-01
   1875      0    124    300 10,514.17    4    System      win2k8-01
   5552     91  94932 111780  3,009.01  828    svchost     win2k8-01
    832     21   8832  16596  1,654.25 1740    vmtoolsd    win2k8-01
    630     39  35396  45676  1,591.18 1096    spoolsv     win2k8-01
   1006     26  11548  18792  1,256.78 1292    svchost     win2k8-01
    748     79  61904  69492  1,019.92  988    svchost     win2k8-01
    724     46 228852 200448  1,006.57 1428    tomcat7     win2k8-01

Leave a Reply

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