O Windows mantém esse tipo de informação?
Existem dois eventos aplicáveis que você pode encontrar no log de eventos do sistema, EventID 6008 e < href="https://support.microsoft.com/en-gb/help/2028504/windows-kernel-event-id-41-error-the-system-has-rebooted-without-clean"> EventID 41 .
A perda de energia terá ocorrido em algum momento entre um desses eventos e o evento anterior.
EventID 6008 pode ser mais útil, pois pode incluir um registro de data e hora (se o grupo Carimbo de data e hora persistente a configuração de política está ativada ou não configurada) mostrando o tempo de atividade em segundos antes do desligamento inesperado.
Usar esse valor junto com o registro de data e hora da inicialização anterior permitirá que você calcule uma hora próxima à ocorrência da falta de energia.
A inicialização anterior pode ser encontrada procurando EventID 6005 O serviço de log de eventos foi iniciado .
Se o seu sistema for alimentado por bateria (por exemplo, um laptop), você poderá descobrir exatamente a que horas ocorreu a perda de energia. Veja minha resposta Como posso saber quando meu laptop foi desconectado pela última vez no Windows 10? para um arquivo em lote que faz isso.
EventID 6008 O desligamento anterior do sistema em% 1 em% 2 foi inesperado
Event Id: 6008
Source: Eventlog
Description: The previous system shutdown at %1 on %2 was unexpected.
Cause 1:
This event is written during startup following an unexpected restart or shutdown. An unexpected restart or shutdown is one that the system cannot anticipate, such as when the user pushes the computers reset button or unplugs the power cord.
If the Persistent Time Stamp group policy setting is either enabled or not configured, system information is written to the data section of this event. This information includes a timestamp that indicates the computers uptime in seconds before the unexpected shutdown occurred.
EventID 41 Kernel-Power
A critical error message that resembles the following is recorded in the event log:
Event ID: 41
Description: The system has rebooted without cleanly shutting down first.
Note: The values for the Stop error BugcheckCode and the BugcheckParameters can vary.
The kernel power event ID 41 error occurs when the computer is shut down, or it restarts unexpectedly. When a computer that is running Windows starts, a check is performed to determine whether the computer was shut down cleanly. If the computer was not shut down cleanly, a Kernel Power Event 41 message is generated.
An event 41 is used to report that something unexpected happened that prevented Windows from shutting down correctly. There may be insufficient information to explicitly define what happened. To determine what may have happened and to identify a potential resolution, it is important to know what the computer was doing at the time just before the event occurred.
If event 41 is logged because power to the computer was interrupted, consider obtaining an uninterruptible power supply (UPS) such as a battery backup power supply. An underpowered or failing power supply may cause this behavior. For example, if you added RAM or additional devices or hard disks when this problem began, the power supply may cause the problem.