1

How can I check CPU temp from the command line in Windows 10?

I have an older computer that I installed a pre-assembled CPU cooler with radiator from Corsair, and I think that it is failing because I get CPU overtemp messages at reboot. I realize that there are freeware apps that are capable of delivering this information, and I have installed the ASUS AI suite that goes with my motherboard and that is giving me the information that I want. But it is a little infuriating that I have to install this software to get the temperature data.

I have found a script at this link that runs in powershell that calls the temp and sets it to a variable like so:

function Get-Temperature {
$t = Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi"

And I guess that WMiObject is supposed to return a temperature in (degrees Kelvin)*e+2, because later in the script it does conversions which return Kelvin, Celsius and Farenheit. However, when I run it on my machine it returns 0 Kelvin and -273 Celsius and whatever that is in Fahrenheit.

I assume that something in that line is wrong? Can you help?

Virgilio
  • 41
  • 1
  • 9
  • Possible duplicate of [Batch-file get CPU temperature in °C and set as variable](https://stackoverflow.com/questions/24004300/batch-file-get-cpu-temperature-in-c-and-set-as-variable) – Marker May 25 '18 at 17:35
  • 1
    Those freeware applications don't use WMI to access this information. Generally the method is to use the `RDMSR` instruction ("Read Model-Specific Register") to access the data. The details, such as the equation to turn the raw reading into a temperature, vary by processor family, which is why you see tools like OpenHardwareMonitor release new versions from time to time with no logic changes, just support for newly released processors. – Ben Voigt May 25 '18 at 17:59

0 Answers0