Skip to content

Instantly share code, notes, and snippets.

View foxpy's full-sized avatar
🏠
Working from home

Murad foxpy

🏠
Working from home
  • Hadron Labs
  • Cyprus, Nicosia
  • 19:17 (UTC +03:00)
View GitHub Profile
@jeffa00
jeffa00 / Get-Temperature
Last active April 19, 2024 20:06
Get CPU Temperature With PowerShell
function Get-Temperature {
$t = Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi"
$currentTempKelvin = $t.CurrentTemperature / 10
$currentTempCelsius = $currentTempKelvin - 273.15
$currentTempFahrenheit = (9/5) * $currentTempCelsius + 32
return $currentTempCelsius.ToString() + " C : " + $currentTempFahrenheit.ToString() + " F : " + $currentTempKelvin + "K"
}