Skip to content

Instantly share code, notes, and snippets.

@rossarioking
Last active September 23, 2023 14:07
Show Gist options
  • Save rossarioking/a14ceb09d69facb589f44cb3c98795a7 to your computer and use it in GitHub Desktop.
Save rossarioking/a14ceb09d69facb589f44cb3c98795a7 to your computer and use it in GitHub Desktop.
Monitoring CPU Usage with Powershell
Get-Counter '\Processor(_Total)\% Processor Time' -Continuous | ForEach-Object {Write-Host "CPU Usage: $($_.CounterSamples[0].CookedValue)%"; Start-Sleep -Seconds 5}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment