HerbM
HerbM

Reputation: 571

Obtain CMOS Battery Status Info on Windows

How can I obtain CMOS Battery Status Info on Windows, preferably with PowerShell or VBScript (or some other easy method)

I am expecting the likely alternatives include Performance Counters or more likely WMI.

Assume fairly recent Windows computers (Win2003 to 2008-R2).

Also, assume fairly random (but 3rd Millenium) hardware, but getting this on Dell would be a good start if your answer is manufacturer specific.

So far, I have seen objects for things like Win32_bios but no explication of how to get the CMOS battery status nor of how to interpret it if that is already present and available.

NOTE: This is NOT about the main battery on a laptop, but rather the battery back up IF ANY on a server or workstation class hardware.

Thanks in advance.

HerbM

Upvotes: 3

Views: 5880

Answers (1)

vonPryz
vonPryz

Reputation: 24071

I don't believe CMOS information is available on any of the standard WMI classes. You should take a look at hardware vendor's classes. As for the Dell systems, look into root\cimv2\dell. In Powershell, you can get all the available classes like so,

Get-WMIObject -namespace "root\cimv2\dell"  -list

Exploring namespaces is easy too:

Get-WMIObject -namespace "root" -class "__Namespace" | Select Name

Upvotes: 2

Related Questions