Skip to content

How to Check Computer Uptime in Windows

Category
Windows
Versions & support
About Windows →
On this page

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

Check Computer Uptime in Task Manager

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

Check Computer Uptime in Command Prompt

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"

Check Windows Uptime in Command Prompt

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

Check Computer Uptime in PowerShell

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

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

Check Windows Uptime in PowerShell

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.

Rahul

Rahul Kumar is the founder and chief editor of TecAdmin.net. A Red Hat Certified Engineer (RHCE), he has worked in IT since 2009, with hands-on experience in Linux system administration, DevOps, web hosting, cloud platforms and automation. He started TecAdmin in 2013 to share practical, step-by-step guides, and leads its editorial work with one aim: making technical learning clear and useful for sysadmins, developers and beginners alike.

Leave a Reply

Your email address will not be published. Required fields are marked *


Back to top