brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: powercfg /batteryreport creates an HTML report about your laptop battery

Tools
~/tips/tip-windows-powercfg-batteryreport

powercfg /batteryreport

Generates an HTML report with battery usage over the lifetime of the system.

If a laptop battery seems to give up sooner every month, Windows can show you the history instead of leaving you to guess.

powercfg /batteryreport
powercfg /batteryreport /output "C:\Temp\battery.html"
powercfg /batteryreport /duration 14

Microsoft describes /batteryreport as a report of battery usage characteristics over the lifetime of the system. It writes an HTML file in the current path, and the command prints the location when it finishes. Open the file in any browser.

/output lets you choose the path and file name, which is handy because the default folder depends on where your prompt is. /duration sets the number of days to analyze, and /xml writes XML instead.

The same tool has powercfg /energy, which analyzes a system for energy and battery problems and writes an HTML report, and powercfg /sleepstudy, which reports on modern standby quality.

The caveat is that the report is generated on request, and only covers what the system has recorded. A desktop PC has no battery to report on. And the report describes what happened, it does not fix anything. Use it to decide whether the battery or the software is the problem, for instance by checking whether usage drops sharply after an update.

Further reading: Microsoft Learn: powercfg command-line options

More Tools tips shuf -n 3 films.txt xmllint --format feed.xml pdftotext -layout invoice.pdf invoice.txt qrencode -t ANSIUTF8 'https://example.com/a/long/path?id=12345' where python All Tools tips (14) All topics

Link