# need to find which process using more CPU on remote computer

**URL:** <https://forums.powershell.org/t/need-to-find-which-process-using-more-cpu-on-remote-computer/14312>\
**Category:** PowerShell Help\
**Created:** [May 2, 2020, 8:15am UTC](https://forums.powershell.org/t/need-to-find-which-process-using-more-cpu-on-remote-computer/14312 "2020-05-02T08:15:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kuchalakanti](https://avatars.discourse-cdn.com/v4/letter/k/ee59a6/32.png) [@kuchalakanti](https://forums.powershell.org/u/kuchalakanti)\
**Post date:** [May 2, 2020, 8:15am UTC](https://forums.powershell.org/t/need-to-find-which-process-using-more-cpu-on-remote-computer/14312/1 "2020-05-02T08:15:08Z")

</div>

need to find which process using is consuming more CPU on remote computer including whole CPU usage of server.

i have tried below script, it give process wise of cpu usage, including this i would require whole cpu consumption of the server, like Task manager in windows.

```
$servers = Get-Content c:\temp\servers.txt
$ErrorActionPreference = 'silentlycontinue'

foreach ($server in $servers)

{
try{

Invoke-Command -scriptblock {Get-Process | Sort CPU -descending | Select -first 5 } -computername $servers

}

catch{
Write-Warning "System Not reachable:$server"
}
}
```

---

<div class="post-metadata">

**Author:** ![kvprasoon](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/kvprasoon/32/4449_2.png) [@kvprasoon](https://forums.powershell.org/u/kvprasoon)\
**Post date:** [May 3, 2020, 10:42pm UTC](https://forums.powershell.org/t/need-to-find-which-process-using-more-cpu-on-remote-computer/14312/2 "2020-05-03T22:42:47Z")

</div>

You can sum up CPU usage by all the process using Measure-Command cmdlet.

```
Get-Process | Sort CPU -descending | Measure-Command -Property CPU -Sum
```

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:29pm UTC](https://forums.powershell.org/t/need-to-find-which-process-using-more-cpu-on-remote-computer/14312/3 "2024-05-16T20:29:45Z")

</div>


