Retrieve Intel PCH temperature with Powershell

2019-07-09 09:30发布

问题:

I'm trying to retrieve the intel PCH temperature with powershell. I cannot find any way to retrieve this temperature using wmi. The chipset on my machine is HM77. I've tried reading through the data sheet provided on the intel site, but to no success. Does anyone know how to do this?

Thanks.

Note: I can read this intel PCH temperature sensor through the HWINFO application, so it can be done somehow.

回答1:

I think I got it. In powershell command line I typed wmic and I entered "wmic:root\cli>" prompt. Then I typed temperature, and it listed all sensors with their DeviceIDs. In CreationClassName it says "Win32_TemperatureProbe".

Now you just need to find the right property to read temp. They're explained here: Win32_TemperatureProbe class

PS script to list all the properties with values:

$probes = Get-WmiObject -class Win32_TemperatureProbe
foreach($probe in $probes) {
    Write-Host $probe
    $probe | Format-List -Property *
}

I didn't find my MB temp, because I have two sensors on my motherboard and I don't know which is which, and I don't have time to read the documentation, but this should get you started.



回答2:

To use PowerShell, you would probably have to do it through WMI (i.e. @frikozoid's very good answer). Unfortunately it's not is possible to get the temperature reading through WMI. The MSDN documentation says

"Real-time readings for the CurrentReading property cannot be extracted from SMBIOS tables. For this reason, current implementations of WMI do not populate the CurrentReading property. The CurrentReading property's presence is reserved for future use."

:-(

The reasoning is that each mother board manufacturer has different ways of returning temperature values which would need motherboard specific dll's, etc....

The easiest tool I found for monitoring motherboard temperatures is SpeedFan. It supports almost every motherboard out there, and is pretty easy to use.

As for Temperature, you generally want your chipset to stay below 60 C. CPU temps could go up to 70C, as well as GPU's. In general if you can keep everything below 60C things will run very well for a long time. I know on my system if my GPU went above 70C, things started to get funky, and usually the system would crash.

---Edit---

It looks like you may be able to do part of that through SpeedFan. SpeedFan has a way to configure events (see: Configure Events) So you can set it to execute a script when your temperature hits a certain value.



回答3:

You can get current temperature for all the sensors of your motherboard using this command

Get-WmiObject -Class Win32_PerfFormattedData_Counters_ThermalZoneInformation |Select-Object Name,Temperature

Your Output should look similar to this based on Sensors available in your system.

Name      Temperature
----      -----------
\_TZ.PCHZ         400
\_TZ.BATZ         273
\_TZ.LOCZ         334
\_TZ.EXTZ         327
\_TZ.GFXZ         335
\_TZ.CPUZ         337

Edited (30/April/2016)

For those who are using CommandLine and can use

wmic /namespace:\\root\cimv2 PATH Win32_PerfFormattedData_Counters_ThermalZoneInformation get Temperature

All the temperatures are in kelvin you can easily convert them to °C or ° F