Powercfg.exe is used to monitor/control various power related operations for Windows.
To generate a battery health report run the following command:
powercfg.exe /batteryreport /output "C:\battery-report.html"
A HTML report will then be generated and stored in the output location with various battery health information. If you do not specify the /output switch the report will be placed in the current working directory.
A Sleep Study report can be executed to get battery drain information:
powercfg.exe /SleepStudy /output "C:\sleepstudy-report.html"
The /output switch is optional; if you do not add it the output will be located in the current working directory. By default only the last 3 days of information is used for the report; to increase the time period specify the /duration switch:
powercfg.exe /SleepStudy /output "C:\sleepstudy-report.html" /duration 7