How to determine if the last shutdown was due to power failure in windows?
I know I can get logs of shutdowns from the eventlog when the shutdown is proper and initiated by the user or due to software upgrades. But how do I determine if the last shutdown was due power failure, over heating etc?
Solution 1:
In the System
event log, look for EventID 41 Kernel-Power. It's description is:
The system has rebooted without cleanly shutting down first. This error could be caused if the system stopped responding, crashed, or lost power unexpectedly.
That sounds like what you're looking for, correct?
Solution 2:
You can create a custom event viewer view of the System log and restrict the source to
Source: Microsoft-Windows-Kernel-Power
These should notify you about power-loss and subsequent power-restored events.