powershell - 列出 CPU 和 GPU 温度的 PowerShell 脚本
问题描述
我想从多台机器上抓取 CPU/GPU 温度
所以基本上我想要这样的输出
计算机名称 CPU 温度 GPU 温度
COMPUTER001 80度70度
然后是表格中每台计算机的列表,甚至更好的是网格输出格式。
我已经在家里自己的机器上测试了这段代码,它提出了以下......
Get-WmiObject : Not supported
At line:1 char:2
+ Get-WmiObject MSAcpi_ThermalZoneTemperature -Namespace "root/wmi"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
因此,由于某种原因,这实际上不起作用,但是如果我在工作的机器上这样做,它会起作用吗?很困惑。
解决方案
推荐阅读
- c - 指针非法访问 PIC32 上的数组
- java - 如何使用 CardLayout 将 JPanel 从另一个类添加到面板?
- swagger-ui - 如何在 OpenAPI 3.0 中记录 RFC3339 日期时间输入?
- reactjs - 无法设置状态以响应字符串数组
- typescript - 尽管声称 Prettier 不支持私有方法
- angular6 - angular6不刷新css更改
- git - “与您的容器共享 Git 凭据”不起作用
- jenkins - Jenkins 声明式管道 ssh 代理插件
- mysql - NodeJS Mysql pool.query() 没有释放连接?
- python - Django Auth Group 拒绝更改 UpdateViews