Skip to content

Instantly share code, notes, and snippets.

@oliverlabs
Created August 8, 2024 14:54
Show Gist options
  • Select an option

  • Save oliverlabs/1b77dfb218698afd8d22f2583d11a727 to your computer and use it in GitHub Desktop.

Select an option

Save oliverlabs/1b77dfb218698afd8d22f2583d11a727 to your computer and use it in GitHub Desktop.
Get CPU Temperature on Windows
Get-CimInstance -Namespace root/wmi -ClassName MsAcpi_ThermalZoneTemperature -Filter "Active='True' and CurrentTemperature<>2732" -Property InstanceName, CurrentTemperature |
Select-Object InstanceName, @{n='CurrentTemperatureC';e={'{0:n0} C' -f (($_.CurrentTemperature - 2732) / 10.0)}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment