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.开发者_StackOverflow中文版 According to the documentation, NULL doesn't even seem like a possible value.
Not all WMI classes are implemented by all hardware.
As an alternative, you could always parse the output of powercfg -a
精彩评论