Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Windows 11 Command to See Last Reboot

· 6 min read · Home Tech

In this article
  1. Why You Might Need the Last Reboot Time
  2. The Core Command: systeminfo
  3. Alternative: Using PowerShell to Get Boot Time
  4. Finding the Last Reboot with Event Logs (More Detail)
  5. How to Choose the Right Command
  6. Common Problems and Misconceptions
  7. Safety and Accuracy Notes
  8. Frequently Asked Questions

The quickest command to see the last reboot time in Windows 11 is systeminfo | find "System Boot Time" in Command Prompt or PowerShell. For a more detailed view that includes shutdown times and unexpected restarts, use Get-WinEvent -FilterHashtable @{LogName='System'; Id=1074,6005,6006,6008} | Select-Object TimeCreated, Id, Message in PowerShell.

Why You Might Need the Last Reboot Time

Knowing when your PC last restarted is useful for several reasons. You might be troubleshooting a stability issue and want to confirm whether a scheduled update or a crash caused the restart. IT administrators often need this information to verify that a patch was applied and the machine rebooted as required. Home users might simply want to know how long the system has been running before deciding to restart it to clear memory leaks or apply pending updates. Windows does not display this information in an obvious place in the Settings app, so a command-line query is the fastest method.

The Core Command: systeminfo

The systeminfo command displays a comprehensive summary of your system configuration, including the OS version, installed hotfixes, network adapter details, and crucially, the System Boot Time. This is the moment the Windows kernel was loaded, which corresponds to the last time you turned on the PC or restarted it (not a sleep or hibernate wake, which only resumes the session).

To use it:

  1. Press Win + R, type cmd, and press Enter (or right-click the Start button and select “Terminal” or “Command Prompt”).
  2. Type the following and press Enter:
    systeminfo | find "System Boot Time"
  3. The output will look like: System Boot Time: 2025-04-10, 09:23:15

The find filter narrows the output to just the line you need, avoiding the long list of other system details. If you prefer PowerShell, you can use systeminfo | Select-String "System Boot Time" instead.

Alternative: Using PowerShell to Get Boot Time

PowerShell offers a more direct and scriptable approach. The Get-CimInstance cmdlet can retrieve the last boot time from the operating system class:

Get-CimInstance -ClassName Win32_OperatingSystem | Select-Object LastBootUpTime

This returns a date-time object, which you can format or compare programmatically. For example, to see how many days ago the PC booted:

(Get-Date) - (Get-CimInstance Win32_OperatingSystem).LastBootUpTime

This outputs a timespan like Days : 3 Hours : 2 Minutes : 45.

Finding the Last Reboot with Event Logs (More Detail)

If you need to know not just the boot time but also the reason for the last restart (e.g., expected update vs. unexpected crash), the Windows Event Log is the authoritative source. The System log records events with specific IDs:

  • Event ID 6005: The Event Log service was started, which happens at every boot. This is effectively the boot time.
  • Event ID 6006: The Event Log service was stopped, indicating a clean shutdown (often before a planned restart).
  • Event ID 1074: The system was shut down or restarted by a user or process, with a reason code (e.g., “Operating System: Recovery” or “No title for this reason”).
  • Event ID 6008: The previous shutdown was unexpected (a crash or power loss). This is critical for diagnosing blue screens.

To query these in PowerShell, run:

Get-WinEvent -FilterHashtable @{LogName='System'; Id=1074,6005,6006,6008} | Select-Object TimeCreated, Id, Message | Format-List

This lists every occurrence of these events, newest first by default. The TimeCreated for the latest 6005 event is your last boot. The 1074 event will show who initiated the restart and the reason (e.g., “Windows Update”). The 6008 event indicates an unclean shutdown, which is a red flag for hardware or driver issues.

How to Choose the Right Command

Your choice depends on what you need:

  • Quick answer: Use systeminfo | find "System Boot Time" – it’s fast, works in any command prompt, and requires no extra permissions.
  • Scripting or automation: Use PowerShell with Get-CimInstance – it returns a proper object you can store, compare, or output to a file.
  • Diagnosing why the PC rebooted: Use the Event Log query (Event IDs 1074, 6008) – it gives you the reason, which a simple boot time cannot.

Common Problems and Misconceptions

One common mistake is confusing boot time with uptime. The boot time is a specific timestamp; uptime is the duration since then. The systeminfo command also lists “System Up Time” separately, which is the time since boot. If you see a boot time that seems too recent, check whether the PC actually shut down or just slept – sleep does not change the boot time.

Another issue: systeminfo can be slow (sometimes 10-20 seconds) because it enumerates all system details. If you only need the boot time, the PowerShell Get-CimInstance method is faster. Also, if you run the command without administrative privileges, you will still see the boot time, but some event log entries (like 1074) may be partially hidden. Running PowerShell as Administrator will show all messages.

A frequent misconception is that the “LastBootUpTime” from WMI reflects the last time you saw the login screen. That is true only for a full boot. If you use “Fast Startup” (which is enabled by default on many laptops), a shutdown and power-on is actually a hybrid shutdown that saves the kernel session to disk. The boot time will still update, but the startup is faster. This does not affect the accuracy of the command – it still records the moment the kernel loaded.

Safety and Accuracy Notes

All the commands described are read-only and do not modify system settings or files. They are safe to run even on a production machine. However, be aware that the systeminfo output can contain sensitive information like network adapter details and installed hotfixes – if you are sharing the output, redact those sections. Also, the Event Log query can return a large amount of data if you have a long uptime; consider adding -MaxEvents 10 to limit the results, for example: Get-WinEvent -FilterHashtable @{LogName='System'; Id=1074,6005,6006,6008} -MaxEvents 10.

Frequently Asked Questions

Q: Does the boot time change after a sleep or hibernate?
A: No. Sleep and hibernate simply suspend the current session; the kernel is not reloaded. The boot time remains the same until you perform a full shutdown or restart.

Q: How can I see the last reboot time without typing a long command?
A: You can create a simple batch file or PowerShell script that runs the command for you. For example, save systeminfo | find "System Boot Time" as boottime.bat and run it whenever needed. Or use the PowerShell one-liner (Get-CimInstance Win32_OperatingSystem).LastBootUpTime which is short enough to type manually.

Q: Why does systeminfo show a different time than the Event Log?
A: They should match, but if you have multiple disks or a dual-boot system, the Event Log might include events from previous sessions. The systeminfo command reads the current operating system session, so it is the most reliable for the last boot. If they differ, check the time zone settings – both should display in your local time zone, but the raw WMI value is in UTC. PowerShell’s Get-CimInstance returns a local time by default, but if you use Get-WinEvent, the TimeCreated is also local.

Q: Can I see the last reboot time from another computer on the network?
A: Yes, you can use systeminfo /s <computername> or PowerShell with Get-CimInstance -ComputerName <computername> -ClassName Win32_OperatingSystem. You will need appropriate permissions (admin on the target machine) and the network must allow remote WMI or RPC.

Q: What does “System Boot Time” actually mean in systeminfo?
A: It is the exact date and time when the Windows kernel started loading. This is the moment you pressed the power button or selected “Restart”. It does not include the time spent in BIOS/UEFI or the login screen – those occur after the kernel loads, but the timestamp is set at the start of the boot process.