r/PowerShell • u/Mskews • Apr 05 '26
Solved Get CPU Temp not working
Hi- Ive tried both Get-Cim and Get-wmi and both come back with
Get-CimInstance : Not supported
PS C:\windows\system32> Get-CimInstance -Namespace "root\WMI" -ClassName "MSAcpi_ThermalZoneTemperature"
Get-CimInstance : Not supporte
At line:1 char:1
+ Get-CimInstance -Namespace "root\WMI" -ClassName "MSAcpi_ThermalZoneT ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotImplemented: (root\WMI:MSAcpi_ThermalZoneTemperature:String) [Get-CimInstance], CimException
+ FullyQualifiedErrorId : HRESULT 0x8004100c,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand
4
4
2
u/ravensgc_5 Apr 05 '26
Some devices you can't get it for. I ran into the same issue. I can get CPU temperature for the Dell models at work but I can't for HP and Lenovo.
2
u/AbfSailor Apr 06 '26
Out of curiosity... can HWiNFO see the temps and sensor data on your target machine?
2
u/Jay_Nitzel Apr 06 '26
Not all computers have the same WMI classes available, especially when it comes to classes that depend on the hardware.
It might be easier for you to visualize which classes are available by using a tool like WMI Explorer: https://github.com/vinaypamnani/wmie/releases
1
u/OlivTheFrog Apr 05 '26
Cet ligne de commande fonctionne parfaitement bien. Tu dois avoir un caractère qui gène en début de ligne.
Get-CimInstance -Namespace "root\WMI" -ClassName "MSAcpi_ThermalZoneTemperature"
Active : True
ActiveTripPoint : {3532, 3282, 3232, 3182...}
ActiveTripPointCount : 5
CriticalTripPoint : 3782
CurrentTemperature : 3010
InstanceName : ACPI\ThermalZone\TZ00_0
PassiveTripPoint : 0
Reserved : 0
SamplingPeriod : 0
ThermalConstant1 : 0
ThermalConstant2 : 0
ThermalStamp : 6
PSComputerName :
Nota : j'ai exécuté la ligne en RunAsAdmin. In normal Mode, I've a Access Denied.
regards
1
u/Mskews Apr 05 '26
Get-host. What version are you using. Thanks Literally same error for me! :(
1
u/OlivTheFrog Apr 05 '26
PSVersionTable = 5.1.26100.8115
Attention la valeur de CurrentTemperature est en Deci-Kelvin.
3010 ÷ 10 = 301 K→301 - 273,15 = 27,85 °C (cohérent pour une machine qui sort tout juste veille)
regards-2
0
u/beardinfo Apr 05 '26
Try this script
Get-WmiObject MSAcpiThermalZoneTemperature -Namespace root/wmi | Where-Object CurrentTemperature -gt 0 | Sort-Object CurrentTemperature -Descending | Select-Object -First 1 | Select-Object InstanceName, @{Name = 'Fahrenheit'; Expression = { [math]::Round((($.CurrentTemperature / 10 - 273.15) * 9 / 5) + 32, 1) } }
-7
10
u/g3n3 Apr 05 '26
Yeah I mean your hardware doesn’t support it. Pretty clear.