How to get top 5 highest CPU consuming processes and their thread count using powershell command

How to get top 5 highest CPU consuming processes and their thread count using powershell command?

Need values of CPU, ProcessName, PID, Thread count

1 Answer

You can try:

Get-Process | Sort-Object CPU -Desc | Select-Object ID, Name, CPU, @{Name='ThreadCount';Expression ={$_.Threads.Count}} -First 5 Id Name CPU ThreadCount -- ---- --- ----------- 4 System 12803.21875 276 6616 sqlservr 11645.328125 63 1736 dwm 10635.78125 14 5648 msedge 9159.609375 17
16216 msedge 8914.96875 13

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like