none
Get the CPU temperature with PowerShell RRS feed

  • Question

  • Hello everybody!

    With an external software like Core-Temp it is pretty easy to get the CPU temperature. But I would like to obtain the same data through PowerShell or cmd.exe, also for scripting purposes.

    The most useful discussion I've found is here, where the only information given is a link to Microsoft WMIC.

    I've tried the basic WMIC commands, which can easily obtain plenty of informations about the cpu (model, caption, status, frequency) but there was nothing about temperature in

    cpu get /?

    Moreover, if I type

    temperature get /all

    I obtain so much informations, but about a generic temperature probe in the motherboard. Neither

    temperature get cpu

    nor

    wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature
    did work. So, is it possible to obtain with PowerShell (or cmd) the actual CPU temperature, or not?

    Thanks anyway.

    Henry


    • Edited by Henry_8198 Thursday, June 4, 2015 6:27 PM
    Thursday, June 4, 2015 6:25 PM

Answers

  • it appears to depend on the make/model/bios.

    
    get-wmiobject MSAcpi_ThermalZoneTemperature -namespace "root/wmi"

    should give you all of the zone temperatures that report through the BIOS. (cpu, graphics, hdd)

    to turn it into temperatures that make sense maybe:

    $temps = Get-WMIObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi"
    
    $temps | Select-Object -Property InstanceName,@{n="Temps F";e={(($_.currenttemperature /10 -273.15) *1.8 +32)}}

    however if your computer doesn't support it you'll just get "get-wmiobject : Not supported"

    Thursday, June 4, 2015 7:09 PM

All replies

  • it appears to depend on the make/model/bios.

    
    get-wmiobject MSAcpi_ThermalZoneTemperature -namespace "root/wmi"

    should give you all of the zone temperatures that report through the BIOS. (cpu, graphics, hdd)

    to turn it into temperatures that make sense maybe:

    $temps = Get-WMIObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi"
    
    $temps | Select-Object -Property InstanceName,@{n="Temps F";e={(($_.currenttemperature /10 -273.15) *1.8 +32)}}

    however if your computer doesn't support it you'll just get "get-wmiobject : Not supported"

    Thursday, June 4, 2015 7:09 PM

  • $temps = Get-WMIObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi"
    
    $temps | Select-Object -Property InstanceName,@{n="Temps F";e={(($_.currenttemperature /10 -273.15) *1.8 +32)}}


    however if your computer doesn't support it you'll just get "get-wmiobject : Not supported"

    Thank you, I tried in two different machines: for one it worked and for the other (Windows Server 2008 R2) it didn't.

    The error was exactly "get-wmiobject : Not supported". Is there another way for such cases? If a graphic tool like Core-Temp can obtain that value, maybe it is anyway possible to catch it also from the command line.

    Friday, June 5, 2015 10:42 AM
  • Hey guys.

    I've researching for such a thing and I found something that maybe help you.

    The command can be used in both, powershell or cmd, it is in portuguese because I'm in Brazil :

    typeperf "\Informações de Zona Termal(*)\*"

    You can find more information in cmd about the typeperf commands that can be used to obtain hardware's information, the information can be better taken adding some parameters. I'm in Brazil, so in portuguese the commands more detailed appears like above, to obtain the information from all termal zones:

     typeperf "\Informações de Zona Termal(*)\Temperatura de Alta Precisão"

    But for each termal zone I use:

    typeperf \Informações de Zona Termal(\_TZ.TZ01)\Temperatura de Alta Precisão

    typeperf \Informações de Zona Termal(\_TZ.TZ00)\Temperatura de Alta Precisão

    After that you can manipulate the data as --Nick--has shown.

    The data in Fahrenheit will be:

    TemInFahrenheit =(Data/10 -273.15) *1.8 +32

    I hope this could help you.  :D

    Regards.,

    Vinícius de Andrade Barros 

    São Bernardo do Campo/ São Paulo Brazil.



    Thursday, May 10, 2018 5:29 PM
  • that seem to be the same data as from

    MSAcpi_ThermalZoneTemperature


    English btw:

    \Thermal Zone Information(*)\% Passive Limit
    \Thermal Zone Information(*)\Temperature
    \Thermal Zone Information(*)\Throttle Reasons


    typeperf "\Thermal Zone Information(*)\Temperature"


    Wednesday, October 24, 2018 7:58 PM