Skip to main content
Added correct markdown for monospaced code ; Grammatical corrections
Source Link
JW0914
  • 8.3k
  • 7
  • 31
  • 50
 

UseThe below command it will give youthe top 10 CPU utilization and, with output will be refreshed for every 5 seconds:

while(1){ps | Sort-Object -Property cpu -Descending | select -First 10;Write-Host "output will be refreshed in 5 sec's n n Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName"; sleep -Seconds 5}

while(1) {
  Ps | Sort-Object -Property CPU -Descending | Select -First 10
  Write-Host "output will be refreshed in 5 sec's `n `n Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName"
  Sleep -Seconds 5
}

Use below command it will give you top 10 CPU utilization and output will be refreshed for every 5 seconds

while(1){ps | Sort-Object -Property cpu -Descending | select -First 10;Write-Host "output will be refreshed in 5 sec's n n Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName"; sleep -Seconds 5}

 

The below command will give the top 10 CPU utilization, with output refreshed every 5 seconds:

while(1) {
  Ps | Sort-Object -Property CPU -Descending | Select -First 10
  Write-Host "output will be refreshed in 5 sec's `n `n Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName"
  Sleep -Seconds 5
}
deleted 14 characters in body
Source Link

Use below command it will give you top 10 CPU utilization and output will be refreshed for every 5 seconds

while(1){ps | Sort-Object -Property cpu -Descending | select -First 10;Write-Host "output will be refreshed in 5 sec's n n Handles NPMNPM(K) PMPM(K) WSWS(K) CPUCPU(s) Id SISI ProcessName"; sleep -Seconds 5}

Use below command it will give you top 10 CPU utilization and output will be refreshed for every 5 seconds

while(1){ps | Sort-Object -Property cpu -Descending | select -First 10;Write-Host "output will be refreshed in 5 sec's n n Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName"; sleep -Seconds 5}

Use below command it will give you top 10 CPU utilization and output will be refreshed for every 5 seconds

while(1){ps | Sort-Object -Property cpu -Descending | select -First 10;Write-Host "output will be refreshed in 5 sec's n n Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName"; sleep -Seconds 5}

Source Link

Use below command it will give you top 10 CPU utilization and output will be refreshed for every 5 seconds

while(1){ps | Sort-Object -Property cpu -Descending | select -First 10;Write-Host "output will be refreshed in 5 sec's n n Handles NPM(K) PM(K) WS(K) CPU(s) Id SI ProcessName"; sleep -Seconds 5}