There are several ways to find out how long Windows has been running (uptime) since the last boot.
You can use the Task Manager GUI to view the total Windows uptime.
- Open the Task Manager (run the
taskmgr.exe
command or press the Ctrl+Shift+Esc) - Go to the Performance tab -> select CPU
- Check the Up time value
You can also get the last boot time of the computer by using the command:
systeminfo
System Boot Time is the time Windows was last restarted (booted).
In this case, only the last boot time is displayed at the command prompt. To calculate the uptime value as the difference between the current time and the Windows boot time, use the following PowerShell commands:
$boot_time = Get-CimInstance Win32_OperatingSystem | select LastBootUpTime
(Get-Date) - $boot_time.LastBootUpTime | select Days,Hours,Minutes,Seconds
The commands will return the computer’s uptime value in days and hours.
In the new PowerShell Core 6.x and 7.x versions, the new Get-Uptime cmdlet can be used to check the system uptime. This cmdlet returns the uptime value in days, hours, and minutes (in TimeSpan format). Or view the last Windows boot time
Get-Uptime -Since
You can get uptime from a remote computer:
$remotePC='hqpc12b23'
ime
(Get-Date) - (Get-CimInstance Win32_OperatingSystem -ComputerName $remotePC).LastBootupT
Note that on desktops running Windows 10 and 11, the hybrid boot feature (Fast Startup) is enabled by default. In this mode, when the user turns off the computer, Windows does not power off the device, but instead unloads the kernel and drivers into a hibernation file. In this case (as well as after waking from sleep or hibernation), the computer’s uptime is not reset after it is powered on.