Win10 CMD 命令行查看CPU温度

您所在的位置:网站首页 怎么查笔记本的温度 Win10 CMD 命令行查看CPU温度

Win10 CMD 命令行查看CPU温度

2024-07-03 11:29| 来源: 网络整理| 查看: 265

Win10 CMD 命令行查看CPU温度

来源 https://www.bilibili.com/read/cv10952578/

 

〇、打开 Cmd 或者 PowerShell鼠标移动至左下角,右键单击,然后点击 Windows PowerShell

通过 Win 徽标打开Power Shell

 

一、输入以下代码并运行

1.0 方法一

"CPU: $(((Get-CimInstance -Namespace root/WMI -ClassName MSAcpi_ThermalZoneTemperature)[0].CurrentTemperature - 2731.5) / 10) C"

 

1.1 方法二

function Get-Temperature { $t = Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi" $returntemp = @() foreach ($temp in $t.CurrentTemperature) { $currentTempKelvin = $temp/10 $currentTempCelsius = $currentTempKelvin - 273.15 $currentTempFahrenheit = (9/5) * $currentTempCelsius + 32 $returntemp += $currentTempCelsius.ToString() + " C : " + $currentTempFahrenheit.ToString() + " F : " + $currentTempKelvin + "K" } return $returntemp } Get-Temperature

 

二、结果的输出

CPU温度查询代码输出结果

 

三、API Reference

https://wutils.com/wmi/root/wmi/msacpi_thermalzonetemperature/

https://docs.microsoft.com/en-us/documentation/

 

=========== End

 



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3