«

»

Nov 25

Print this Post

How to find CPU Usage via Command line PowerShell.

CPU Usage via Command line.

@echo off

Powershell -command “&{Get-WmiObject -Query ‘Select * from Win32_PerfFormattedData_PerfProc_Process ‘| Select Name, @{Name=’CPU(p)’;Expression={$_.PercentProcessorTime}} | where {$_.’CPU(p)’ -gt 0 } |Sort ‘CPU(p)’ -descending | Format-Table -AutoSize;}”

CPU Usage via PowerShell

Get-WmiObject -Query ‘Select * from Win32_PerfFormattedData_PerfProc_Process ‘| Select Name, @{Name=’CPU(p)’;Expression={$_.PercentProcessorTime}} | where {$_.’CPU(p)’ -gt 0 } |Sort ‘CPU(p)’ -descending | Format-Table -AutoSize;}”

 

 

Permanent link to this article: http://www.techxpress.in/how-to-find-cpu-usage-via-command-line-powershell/

Bookmark this page