如何通过WMI检索计算机的电源管理能力?
我想使用 WMI 来了解我的计算机具有哪些电源管理功能。他们能睡觉吗?它们能冬眠吗?等等。
有一个 PowerManagementCapability 字段似乎承诺了这一切。唯一的问题是它的一切都是NULL。
还有其他办法吗?我的环境在某种程度上是特殊的吗?一切都是空的。根据文档,NULL 似乎根本不是一个可能的值。
I'd like to use WMI to figure out what power management capabilities my computers have. Can they sleep? Can they hibernate? etc.
There is a PowerManagementCapabilities field which seems to promise all that. The only problem is that it's NULL of everything.
Is there any other way? Is my environment special in some way that everything is null. According to the documentation, NULL doesn't even seem like a possible value.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
并非所有 WMI 类都由所有硬件实现。
作为替代方案,您始终可以解析 powercfg -a 的输出
Not all WMI classes are implemented by all hardware.
As an alternative, you could always parse the output of
powercfg -a