Forum Discussion
CPU Load Percentage PowerShell Windows Server 2019
Hello friends
I want to check the percentage of use of Windows Server 2019 Server processors.
I tried to use the query I was doing with Windows Server 2012, but it returns me the empty value.
Could anyone know how I can do this in Windows Server 2019?
friends,
I got it with the simple code below
wmic cpu get loadpercentage
If anyone else needs it.
Thank you all for the attention!
- Jon Alfred SmithCopper Contributor
erickgomes Your command does not appear to work, neither on Windows 10 nor Windows Server 2019. Try this one instead:
Get-WmiObject -class win32_processor | Measure-Object -property LoadPercentage -Average | Select-Object -ExpandProperty Average- erickgomesCopper Contributor
- erickgomesCopper Contributor
friends,
I got it with the simple code below
wmic cpu get loadpercentage
If anyone else needs it.
Thank you all for the attention!
- DarrickBrass Contributor
Use Get-CimInstance instead:
(Get-CimInstance -Class Win32_Processor).LoadPercentage
- DataDiggerCopper Contributor
erickgomes I'm facing the same error. Win32_Processor is not displaying any results for CPU load percentage.