strComputer = "."
Set colTempProbe = GetObject("Winmgmts:"_
& "{impersonationLevel=impersonate}!\\"_
& strComputer & "\root\cimv2")._
InstancesOf("Win32_TemperatureProbe")
Num = 0
For Each obj In colTempProbe
WScript.Echo obj.Name & VBNewLine _
& obj.DeviceID & VBNewLine _
& obj.Status & VBNewLine _
& obj.Resolution & VBNewLine _
& obj.Tolerance & VBNewLine _
& obj.Accuracy
Num = Num +1
Next
If Num = 0 Then
WScript.Echo "No temperature probe data"
End If
The Win32_TemperatureProbe WMI class represents the properties of a temperature sensor (electronic thermometer).
Most of the information that the Win32_TemperatureProbe WMI class provides comes from SMBIOS. 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 following syntax is simplified from Managed Object Format (MOF) code and includes all inherited properties.