15
5
How can I get the battery status in windows? On Linux it is as simple as acpi -b
but in Windows this simple task seems impossible.
powercfg -energy
can get all kinds of all information, but won't output something as simple as the charge level. I just need something simple which I can use for some scripts.
2You can also use:
powercfg /batteryreport /output C:\Location\FileName.html
This isn't exactly the best for scripts and offers more than simple battery charge level but offers a lot more information regarding health, battery charge history, degradation, etc... However despite the fact that it doesn't display simple info, it is user friendly to read which may pertain to your script and can also be loaded directly after creation of the .html
which is easily scriptable. This is actually my preferred method for the script that I use. – BiTinerary – 2015-05-25T23:47:23.373Thanks for your answer. powercfg also requires admin privileges to run whereas WMIC does not. – podperson – 2018-10-22T20:46:45.003
2@PSYU If this answer solved your question, click the checkmark next to it. – stommestack – 2013-08-30T17:18:44.100