title: Is there any way to get CPU temperature using Powershell?
body: <p>I want to develop a Powershell script to get CPU temperature.
  Currently I'm using <code>MSAcpi_ThermalZoneTemperature</code> class using <code>Get-WMIObject</code>:</p>
  <pre><code>Get-WmiObject -Class MSAcpi_ThermalZoneTemperature -Namespace &quot;root/wmi&quot;
  </code></pre>
  <p>As a result of above command I'm getting 3 objects, only 1 of which is for the CPU:</p>
  <pre><code>__GENUS              : 2
  __CLASS              : MSAcpi_ThermalZoneTemperature
  __SUPERCLASS         : MSAcpi
  __DYNASTY            : MSAcpi
  __RELPATH            : MSAcpi_ThermalZoneTemperature.InstanceName=&quot;ACPI\\ThermalZone\\TZ00_0&quot;
  __PROPERTY_COUNT     : 12
  __DERIVATION         : {MSAcpi}
  __SERVER             : LAPTOP-T4Q10Q07
  __NAMESPACE          : root\wmi
  __PATH               : \\LAPTOP-T4Q10Q07\root\wmi:MSAcpi_ThermalZoneTemperature.InstanceName=&quot;ACPI\\ThermalZone\\TZ00_0&quot;
  Active               : True
  ActiveTripPoint      : {3782, 3282, 3232, 0...}
  ActiveTripPointCount : 3
  CriticalTripPoint    : 4832
  CurrentTemperature   : 0
  InstanceName         : ACPI\ThermalZone\TZ00_0
  PassiveTripPoint     : 0
  Reserved             : 0
  SamplingPeriod       : 0
  ThermalConstant1     : 0
  ThermalConstant2     : 0
  ThermalStamp         : 101
  PSComputerName       : LAPTOP-T4Q10Q07
  
  __GENUS              : 2
  __CLASS              : MSAcpi_ThermalZoneTemperature
  __SUPERCLASS         : MSAcpi
  __DYNASTY            : MSAcpi
  __RELPATH            : MSAcpi_ThermalZoneTemperature.InstanceName=&quot;ACPI\\ThermalZone\\TZ01_0&quot;
  __PROPERTY_COUNT     : 12
  __DERIVATION         : {MSAcpi}
  __SERVER             : LAPTOP-T4Q10Q07
  __NAMESPACE          : root\wmi
  __PATH               : \\LAPTOP-T4Q10Q07\root\wmi:MSAcpi_ThermalZoneTemperature.InstanceName=&quot;ACPI\\ThermalZone\\TZ01_0&quot;
  Active               : True
  ActiveTripPoint      : {0, 0, 0, 0...}
  ActiveTripPointCount : 0
  CriticalTripPoint    : 4832
  CurrentTemperature   : 0
  InstanceName         : ACPI\ThermalZone\TZ01_0
  PassiveTripPoint     : 0
  Reserved             : 0
  SamplingPeriod       : 0
  ThermalConstant1     : 0
  ThermalConstant2     : 0
  ThermalStamp         : 101
  PSComputerName       : LAPTOP-T4Q10Q07
  
  __GENUS              : 2
  __CLASS              : MSAcpi_ThermalZoneTemperature
  __SUPERCLASS         : MSAcpi
  __DYNASTY            : MSAcpi
  __RELPATH            : MSAcpi_ThermalZoneTemperature.InstanceName=&quot;ACPI\\ThermalZone\\TZ02_0&quot;
  __PROPERTY_COUNT     : 12
  __DERIVATION         : {MSAcpi}
  __SERVER             : LAPTOP-T4Q10Q07
  __NAMESPACE          : root\wmi
  __PATH               : \\LAPTOP-T4Q10Q07\root\wmi:MSAcpi_ThermalZoneTemperature.InstanceName=&quot;ACPI\\ThermalZone\\TZ02_0&quot;
  Active               : True
  ActiveTripPoint      : {0, 0, 0, 0...}
  ActiveTripPointCount : 0
  CriticalTripPoint    : 0
  CurrentTemperature   : 3010
  InstanceName         : ACPI\ThermalZone\TZ02_0
  PassiveTripPoint     : 0
  Reserved             : 0
  SamplingPeriod       : 0
  ThermalConstant1     : 0
  ThermalConstant2     : 0
  ThermalStamp         : 100
  PSComputerName       : LAPTOP-T4Q10Q07
  </code></pre>
  <p>Please suggest me how can I make script to return only object of cpu.</p>