SOLVED

CPU Load Percentage PowerShell Windows Server 2019

%3CLINGO-SUB%20id%3D%22lingo-sub-715362%22%20slang%3D%22en-US%22%3ECPU%20Load%20Percentage%20PowerShell%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-715362%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20friends%3C%2FP%3E%3CP%3EI%20want%20to%20check%20the%20percentage%20of%20use%20of%20Windows%20Server%202019%20Server%20processors.%3C%2FP%3E%3CP%3EI%20tried%20to%20use%20the%20query%20I%20was%20doing%20with%20Windows%20Server%202012%2C%20but%20it%20returns%20me%20the%20empty%20value.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECould%20anyone%20know%20how%20I%20can%20do%20this%20in%20Windows%20Server%202019%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F120343i3454C74EA9D19E84%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22ps.jpg%22%20title%3D%22ps.jpg%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-715362%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EWindows%20PowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-716102%22%20slang%3D%22en-US%22%3ERe%3A%20CPU%20Load%20Percentage%20PowerShell%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-716102%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F364999%22%20target%3D%22_blank%22%3E%40erickgomes%3C%2FA%3E%26nbsp%3BYour%20command%20does%20not%20appear%20to%20work%2C%20neither%20on%20Windows%2010%20nor%20Windows%20Server%202019.%20Try%20this%20one%20instead%3A%3CBR%20%2F%3EGet-WmiObject%20-class%20win32_processor%20%7C%20Measure-Object%20-property%20LoadPercentage%20-Average%20%7C%20Select-Object%20-ExpandProperty%20Average%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-717237%22%20slang%3D%22en-US%22%3ERe%3A%20CPU%20Load%20Percentage%20PowerShell%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-717237%22%20slang%3D%22en-US%22%3E%3CP%3EHy%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F221258%22%20target%3D%22_blank%22%3E%40Jon%20Alfred%20Smith%3C%2FA%3E%2C%26nbsp%3Bthanks%20for%20answering.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%20does%20not%20work%20%3A(%3C%2Fimg%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20858px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F120434i465068944A6F8234%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22powershell.png%22%20title%3D%22powershell.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-718433%22%20slang%3D%22en-US%22%3ERe%3A%20CPU%20Load%20Percentage%20PowerShell%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-718433%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Efriends%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20got%20it%20with%20the%20simple%20code%20below%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3Ewmic%20cpu%20get%20loadpercentage%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20anyone%20else%20needs%20it.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20all%20for%20the%20attention!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-725407%22%20slang%3D%22en-US%22%3ERe%3A%20CPU%20Load%20Percentage%20PowerShell%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-725407%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F221258%22%20target%3D%22_blank%22%3E%40Jon%20Alfred%20Smith%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EUse%20Get-CimInstance%20instead%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E(Get-CimInstance%20-Class%20Win32_Processor).LoadPercentage%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-725408%22%20slang%3D%22en-US%22%3ERe%3A%20CPU%20Load%20Percentage%20PowerShell%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-725408%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F364999%22%20target%3D%22_blank%22%3E%40erickgomes%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E(Get-CimInstance%20-Class%20Win32_Processor).LoadPercentage%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1369406%22%20slang%3D%22en-US%22%3ERe%3A%20CPU%20Load%20Percentage%20PowerShell%20Windows%20Server%202019%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1369406%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F364999%22%20target%3D%22_blank%22%3E%40erickgomes%3C%2FA%3E%26nbsp%3BI'm%20facing%20the%20same%20error.%26nbsp%3BWin32_Processor%20is%20not%20displaying%20any%20results%20for%20CPU%20load%20percentage.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

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?

 


ps.jpg

6 Replies
Highlighted

@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

Highlighted

Hy @Jon Alfred Smith, thanks for answering.

 

 

Also does not work :(

 

powershell.png

Highlighted
Solution

 

friends,

 

I got it with the simple code below

 

wmic cpu get loadpercentage

 

 

If anyone else needs it.

 

Thank you all for the attention!

 

Highlighted

@Jon Alfred Smith

 

Use Get-CimInstance instead:

 

(Get-CimInstance -Class Win32_Processor).LoadPercentage

 

Highlighted

@erickgomes

 

(Get-CimInstance -Class Win32_Processor).LoadPercentage

 

 

Highlighted

@erickgomes I'm facing the same error. Win32_Processor is not displaying any results for CPU load percentage.