Windows CPU Diagnostics

CMD

systeminfo

Powershell

Get-WmiObject Win32_Processor | Select LoadPercentage | Format-List

Get-WmiObject Win32_Processor | Measure-Object -Property LoadPercentage -Average | Select Average

Get-Counter '\Processor(_Total)\% Processor Time'

To get the Processor Queue Length...

Get-WmiObject Win32_perfFormattedData_PerfOS_System | Select ProcessorQueueLength | Format-List

To get a rolling monitor of CPU and memory usage (1)...

$totalRam = (Get-CimInstance Win32_PhysicalMemory | Measure-Object -Property capacity -Sum).Sum

while($true) {

    $date = Get-Date -Format "yyyy-MM-dd HH:mm:ss"

    $cpuTime = (Get-Counter '\Processor(_Total)\% Processor Time').CounterSamples.CookedValue

    $availMem = (Get-Counter '\Memory\Available MBytes').CounterSamples.CookedValue

    $date + ' > CPU: ' + $cpuTime.ToString("#,0.000") + '%, Avail. Mem.: ' + $availMem.ToString("N0") + 'MB (' + (104857600 * $availMem / $totalRam).ToString("#,0.0") + '%)'

    Start-Sleep -s 2

}

Bibliography & References