How to Check Boot Time in Windows 10 and Windows Uptime

choubertsprojects

The Best WordPress plugins!

1. WP Reset

2. WP 301 Redirects

3. WP Force SSL

Windows 10 and Windows Uptime are two very important system metrics to monitor. This blog will teach you how to check your boot time in Windows 10, as well as the uptime of a specific device or computer. The process is quick and easy with just a few steps!.

The “how to check boot time windows 10 cmd” is a command-line tool that allows users to check the boot time and uptime of their computer.

How to Check Boot Time in Windows 10 and Windows Uptime

Many server administrators use Windows uptime as a metric to solve day-to-day problems that may develop in the system. You’ll discover how to check startup time in Windows 10 and Windows Server in this post. You are able to choose the method that is most convenient for you. Use this article as a reference in the future.

Checking server uptime and obtaining historical Windows uptime are the two primary sections of this article. The first step will be to determine how long the computer has been up since it was last rebooted. In this article, this is referred to as “current” uptime.

The second section of the article will concentrate on determining “historical” uptime, or how long a Windows system has been up between reboots. You’ll learn how to read the Windows event log using PowerShell to get historical uptime figures.

How to Check Windows 10 and Windows Server Boot Time

Let’s get started by looking at a couple different methods for determining the current Windows uptime.

Throughout this section, you’ll get a demonstration of how to verify startup time in Windows 10 by running commands locally on a Windows PC. You may, however, execute these tests remotely using PowerShell Remoting (excluding Manager of Tasks).

Manager of Tasks

One of the most simple and straightforward ways to find uptime is to simply open Manager of Tasks.

To check Windows uptime with Manager of Tasks, right-click the Windows taskbar and select Manager of Tasks or press Ctrl–Shift–Esc. Once Manager of Tasks is open, click on the Performance tab. Under the Performance tab, you will see a label of Up Time.

Finding Windows uptime with Manager of TasksFinding Windows uptime with Manager of Tasks

Viewer of Events

Viewer of Events is very commonly used by most sysadmins on a regular basis, which makes it a great option for a non-command line-related method of retrieving uptime. Event ID 6005 and 6006 can be used to identify when the event log service starts or stops, which occurs during boot/shut downtimes. Follow these steps to identify uptime via Viewer of Events:

  • Bring up the Start Menu and simply search for Viewer of Events, you can also get to it via Computer Management.
  • Expand the Windows Logs area on the left and choose System.
  • Click “Filter Current Log…” on the right hand side of your window now that we’re just interested in System events.
  • We need to search for our suitable Event IDs in the Event ID area (by default, this will be prefilled with text reading “All Event IDs”), write “6005, 6006,” and then click OK.

After that, you may add the two times together to get a total uptime. We may also query the history of uptimes since numerous occurrences of these events are preserved!

You now have filtered Event Logs that show you not just the most recent bootup/shutdown, but also all known bootup/shutdown timings.

PowerShell

You can get uptime in PowerShell in a few different methods. You may use WMI or the Windows event log to query WMI.

When using WMI, you may pick the LastBootUpTime property from the Win32 OperatingSystem class, as seen below.

PS51> Get-CimInstance Win32_OperatingSystem | Select-Object LastBootUpTime LastBootUpTime ————– 9/25/2019 9:37:37 PM

Use the Get-WinEvent cmdlet in PowerShell to access the Event Log. You’ll need to look for event IDs 6005 or 6006 to see when the machine was last started.

PS51> Get-WinEvent -ProviderName EventLog | Where-Object {$_.Id -eq 6005 -or $_.Id -eq 6006} | Select-Object -First 1 TimeCreated TimeCreated ———– 9/25/2019 9:37:52 PM

WMIC

WMIC is a tried-and-true approach that has been used for many years and offers a command-line interface for WMI. To query uptime using WMIC, you must use the Win32 OperatingSystem WMI class, which is a little hidden. You may use the WMIC syntax os get lastbootuptime to retrieve the last time the server was launched, as shown below.

> wmic os get lastbootuptime LastBootUpTime 20190925213737.500000-240

WMIC is pre-installed with Windows, so you don’t need to download anything to use it.

Utility for System Information

The systeminfo command gives extensive information about a computer’s settings and may be used to check its uptime. You may parse the text using the built-in find command line tool to get the information you need.

Simply enter systeminfo | find in either Command Prompt or PowerShell.

> systeminfo | find “System Boot Time:” System Boot Time: 9/25/2019, 9:37:37 PM

To use systeminfo, you don’t need to download anything since it comes pre-installed with Windows.

Command for Net Statistics

Net Statistics, often known as net stats, may be used to rapidly query uptime. The net stats command delivers summary statistics about your current session. The Statistics since… line may be seen below. This is the date when the machine was turned on.

> net stats srv Workstation Statistics for \NATES-PC Statistics since 9/25/2019 9:37:52 PM –SNIP– The command completed successfully.

Command for Uptime

If you need a small, portable utility to find Windows uptime, look no further than NeoSmart Technologies’ Command for Uptime for Windows. This utility is perfect for quickly querying uptime on any Windows version. The major benefit of this tool is the convenience factor. If you find yourself using this many times per day you may want to consider this method.

Extract uptime.exe to percent WinDir% System32 after downloading the utility. Then just enter uptime into a command prompt.

Tool for calculating uptimeTool for calculating uptime

To use this application remotely, you must first copy it to the Windows computers you want to monitor uptime on.

The Get-ServerUptimeReport script is now available.

Download Get-ServerUptimeReport.ps1 from the community so you don’t have to develop the PowerShell yourself.

PS51> Install-Script -Name Get-ServerUptimeReport

You may provide a machine name as a parameter to this script. It will then examine the computer’s System event log for both a start and stop event to compare. The total time the server was online till the event log rolled will then be returned.

An example of how to run this script on a server is shown below. It will provide you the total uptime for all occurrences in the server’s event log, including the current uptime.

PS51> ./Get-ServerUptimeReport.ps1 -ComputerName sqlsrv1 Startup Shutdown Uptime (Days) Uptime (Min) ——- ——– ————- ———— 9/16/2017 12:40:00 PM 9/22/2017 4:20:11 PM 6.15 8860.18 9/16/2017 10:22:49 AM 9/16/2017 12:22:36 PM 0.08 119.79 9/16/2017 3:22:12 PM 9/22/2017 4:20:11 PM 6.04 8697.98

Finding Windows Uptime on a Large Number of Servers

This script calculates the uptime of a single server over a period of time. But what if you need this information for a large number of servers at the same time? To do so, compile a list of servers and then send each computer’s name to this script one by one.

In the PowerShell console, for example, create an array with all of your servers. The variable array will be named $servers in this case.

However, you may be getting server names from Active Directory, Hyper-V, or a text file in reality. You’ll be good as long as you can construct an array of server names.

Define all of the server names, then use a loop to iterate through them all, as seen below.

foreach ($server in $servers) $servers = ‘WEBSRV1′,’SQLSRV1’ Get-ServerUptimeReport.ps1 -ComputerName $server Get-ServerUptimeReport.ps1 -ComputerName $server Get-ServerUptimeReport.ps1 -Com Startup Shutdown Uptime (Days) Uptime (Min) ———- ———— ——————- —————— 9/16/2017 12:45:48 PM 9/22/2017 4:25:39 PM 6.15 8859.86 9/16/2017 10:42:52 AM 9/16/2017 12:42:34 PM 0.08 119.7 9/16/2017 2:42:17 PM 9/22/2017 4:25:39 PM 6.07 8743.38 9/16/2017 12:40:00 PM 9/22/2017 4:25:39 PM 6.16 8865.65 9/16/2017 10:22:49 AM 9/16/2017 12:22:36 PM 0.08 119.79 9/16/2017 3:22:12 PM 9/22/2017 4:25:39 PM 6.04 8703.46

This code works, but there’s no way to tell which server each row refers to. Using a computed property, add a server name to the result, as seen below.

foreach ($server in $servers) $servers = ‘WEBSRV1′,’SQLSRV1′ Get-ServerUptimeReport.ps1 -ComputerName $server | Select-Object -Property *,@n=’ServerName’;e=$server | Select-Object -Property *,@n=’ServerName’;e=$server Startup Shutdown Uptime (Days) Uptime (Min) ServerName ———- ———— ——————- —————— ————— 9/16/2017 12:45:48 PM 9/22/2017 4:34:59 PM 6.16 8869.19 9/16/2017 WEBSRV1 10:42:52 AM 9/16/2017 12:42:34 PM 0.08 119.7 WEBSRV1 9/16/2017 2:42:17 PM WEBSRV1 9/16/2017 2:42:17 PM WEBSRV1 9/16 9/22/2017 4:34:59 PM 6.08 8752.71 WEBSRV1 Startup Shutdown Uptime (Days) Uptime (Min) ServerName ———- ———— ——————- —————— ————— 9/16/2017 12:40:00 PM 9/22/2017 4:35:01 PM 6.16 8875.01 9/16/2017 10:22:49 AM SQLSRV1 9/16/2017 12:22:36 PM 0.08 119.79 9/16/2017 3:22:12 PM SQLSRV1 9/22/2017 4:35:01 PM 6.05 8712.81 SQLSRV1

We now have a fantastic little tool that can give us with a fast report on our servers’ uptime over time!

Summary

You’ve now seen a variety of methods for determining Windows uptime. You’ll get the same information regardless of whatever choice you choose. Choose the best option for your situation.

Also, don’t forget about the Get-ServerUptimeReport PowerShell script if you require a historical report on uptime history!

The “how to check uptime in windows server using powershell” is a command-line tool that allows users to check the boot time and uptime for a Windows Server.

Frequently Asked Questions

How do I check Windows boot time?

A: If you have Windows 10, you can check your boot time in the settings. It should look like this 0 seconds when its finished loading. You dont need to do anything special for a Linux or Mac system as these operating systems already include functionality that lets you monitor start-up times on their own without third party software.

How do I check my computer uptime?

A: To check your computers uptime, you can either use a free online service such as www.uptime.com or another program that monitors the operating system’s uptime like “System Monitor by NirSoft.

How can I tell when Windows 10 last rebooted?

A: You cannot tell when Windows 10 last rebooted.

Related Tags

  • how to check uptime in windows cmd
  • how to check uptime in windows 10
  • system uptime windows 10
  • check uptime cmd
  • windows uptime format

Table of Content