Computer Uptime refers to how long a system has been up and running without any shutdown or restart. The computer uptime helps us to find the last reboot of any system. This can be helpful in many ways like troubleshooting or scripting etc. In this tutorial, we will discuss three ways to check the uptime of any Windows machine or server.

1. How to Check Windows Uptime with Task Manager

A task manager is a computer program used for checking the process and services running and their details. You can also find details about the resource utilization like Memory and CPU uses at runtime. This is also a quick and preferred way for Windows users to find computer uptime.

  1. Log in to your Windows system.
  2. Right click on task bar and click on Task Manager to launch.
  3. Click “More details”, If the task manager opened in compact view.
  4. Go to Performance tab
  5. In CPU section, you will find computer uptime like below screenshot

How to Check Computer Uptime in Windows cmd Powershell uptime windows Windows Tutorials

As per the above screenshot, this computer is up from 33 Days and 33 minutes.

2. Check Computer Uptime with Command Prompt

You can also find the Windows uptime with the command-line options. Here we will discuss the two commands that provide the uptime details.

A. Using WMIC Command:

WMIC (Windows Management Interface Command), is a simple command-line utility that provides information about the running system. With the help of this command, we can find the last boot-up time.

wmic path Win32_OperatingSystem get LastBootUpTime

How to Check Computer Uptime in Windows cmd Powershell uptime windows Windows Tutorials

B. Using systeminfo Command:

The systeminfo command displays a list of details about your operating system, computer software, and hardware components. You can also check for the value “System Boot Time” to get the computer uptime.

systeminfo | find "System Boot Time"

How to Check Computer Uptime in Windows cmd Powershell uptime windows Windows Tutorials

3. How to Check Windows Uptime with PowerShell

Launch a Powershell window and type the below command to find the last reboot time of the current system.

Get-CimInstance -ClassName Win32_OperatingSystem | Select LastBootUpTime

How to Check Computer Uptime in Windows cmd Powershell uptime windows Windows Tutorials

You can also view the computer uptime in the number of days, hours, minutes formats. Execute the below command and check the results.

(get-date) - (gcim Win32_OperatingSystem).LastBootUpTime

How to Check Computer Uptime in Windows cmd Powershell uptime windows Windows Tutorials

You can also store the output of the above commands to a variable. Which can be helpful for scripting purposes. The below command will store all values in the “uptime” variable.

$uptime = (get-date) - (gcim Win32_OperatingSystem).LastBootUpTime

Next, extract the specific values only and print them on the screen.

Write-Output "The Windows Uptime is >> $($uptime.days) Days, $($uptime.Hours) Hours and $($uptime.Minutes) Minutes"

Output:

The Windows Uptime is >> 35 Days, 12 Hours and 46 Minutes

Conclusion

In this tutorial, you have learned various methods for checking Windows uptime. This guide covers the 3 methods like Task manager, command prompt, and PowerShell to get computer uptime.