Last active
September 23, 2023 14:07
-
-
Save rossarioking/a14ceb09d69facb589f44cb3c98795a7 to your computer and use it in GitHub Desktop.
Monitoring CPU Usage with Powershell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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