LLI Wiki — My Digital Knowledge Base

Windows restart and shutdown history with event IDs

System log event IDs to reconstruct Windows startups, shutdowns and restarts.

Startup, shutdown and user logon/logoff events on a Windows machine are recorded in the System log. The event IDs below let you reconstruct the restart history.

Startup and shutdown events

ID Meaning
6005 The Event Log service started: indicates system startup
6006 The Event Log service stopped: indicates system shutdown
6008 The previous system shutdown was unexpected
6009 Windows product name, build number and OS type detected at boot
6013 Uptime of the computer
1074 A process or a user initiated a restart or shutdown, with the reason given (often triggered by Windows Update)
1076 Reason supplied by the user for the last unexpected shutdown, recorded when the first user with shutdown rights logs on afterwards
7001 / 7002 User logon and logoff (Winlogon)

Check the uptime

In a command prompt (cmd.exe):

systeminfo | find "System Up Time"

On recent Windows versions, the line is called "System Boot Time":

systeminfo | find "System Boot Time"

Query the event log

Get-WinEvent -LogName System | Where-Object {$_.Id -eq 1074 -or $_.Id -eq 6006 -or $_.Id -eq 6008 -or $_.Id -eq 6009} | Select-Object -First 10

Notes

Mastodon LLIMastodon SocialFosstodon