Time in Windows since last boot

Joined
Aug 14, 2015
Messages
2,442
Location
CA, USA
I wanted to know how long my laptop had been running without a reboot. I googled and found (systeminfo | find "System Boot Time"), so that is what I put into the command prompt. I did this yesterday and then rebooted. This morning, curious to see what Windows would tell me, I did this again and found that I was told that it was about 3 days since my last bootup. I also saw that the Task Manager, under Performance, would give me an Up Time number, which was 3 days ago.

So when I restart the computer (I go to the Windows key, press the power button, and then select restart)--that does not reset up time? What does that measure--days since last shut down without a restart?

At any rate, I'd like a quick and easy way to see how to tell how long its been since I've rebooted.
 
That measurement is when the kernel was initialized. Newer hardware & Windows 10 tend to put the system into hybrid sleep/shutdown modes to speed up restarting & booting up.

If you were to shutdown your system using "shutdown /s /f /t 0" (no quotes) in a command prompt you'd notice your system reset that timer on startup.

You can read more about these power states here. Realistically there is no need to disable this but I know some people like things to work the way they're used to.

 
Thanks for the info, Brandon. Given all that, is there a way to have Windows tell me when I last rebooted?
 
Thanks for the info, Brandon. Given all that, is there a way to have Windows tell me when I last rebooted?
There are ways to pull that data by parsing event log data but realistically if this value is important to you I'd go ahead and disable Fast Startup. It's not a huge issue if you're willing to wait a few extra seconds on booting/startup.
 
Thanks for the context here. I think I'll leave fast startup enabled--I only really want to know how long its been since last bootup once every several months or so. Disabling that seems like a high price to pay for the info.
 
Putzing around it looks like you can query some of this data using the Event Log. In a PowerShell window (not command prompt):

Get-WinEvent -ProviderName Microsoft-Windows-Kernel-Boot -MaxEvents 100 | Where-Object {$_.id -eq "27"}

A boot type of 0x0 would be a normal boot where the kernel was loaded (this would update the normal WMI uptime numbers). 0x1 would be a fast boot where the already loaded kernel was restored from memory (uptime numbers not updated).
 
And doing that, got me this:

Putzing.png


So that means that my last bootup was on July 30, correct?
 
I just go to Task Manager (Ctrl-Shift-Esc) and look under the Performance tab under CPU, it has uptime there.
Here is my laptop right now:
uptime.JPG


I believe this is the total time since boot, since it was just over a week ago I know I rebooted it.
My laptop sleeps when the lid is closed, and does not get turned off often, so this time apparently includes sleep time.

Edit: this is Windows 10, not sure if 11 is different.
 
Brandon's post explains it better than I can; as I stated in the OP, doing that gave me a time different than the time of my last reboot.


I just go to Task Manager (Ctrl-Shift-Esc) and look under the Performance tab under CPU, it has uptime there.
Here is my laptop right now:
View attachment 110987

I believe this is the total time since boot, since it was just over a week ago I know I rebooted it.
My laptop sleeps when the lid is closed, and does not get turned off often, so this time apparently includes sleep time.

Edit: this is Windows 10, not sure if 11 is different.
 
Brandon's post explains it better than I can; as I stated in the OP, doing that gave me a time different than the time of my last reboot.
Oh, I guess I did not see that part.
Is this a desktop or laptop? Also Windows 10 or 11?

I disable any of that fast startup type stuff whenever I setup my computer, so never had that issue.
I have a desktop icon I use to shutdown.
I got tired of digging through a menu to shutdown, so made one that goes to %windir%\system32\shutdown.exe -s -t 00
I also have a restart icon that goes to %windir%\system32\shutdown.exe -r -t 00

Plus on desktops, I tend to physically turn off the power when I am done.
 
Back
Top