---
title: "Windows 10 Boot Time and Uptime: PowerShell Insights"
description: "Check boot time in Windows 10 and monitor Windows uptime with this PowerShell script."
canonical: "https://adamtheautomator.com/windows-uptime/"
---

# Windows 10 Boot Time and Uptime: PowerShell Insights

> Check boot time in Windows 10 and monitor Windows uptime with this PowerShell script.

Source: https://adamtheautomator.com/windows-uptime/

---

ATA Learning

Tap to hide

[

ATA Learning

](/)

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Search for:  

*   [](https://twitter.com/adbertram)
*   [](https://github.com/Adam-the-Automator)
*   [](https://www.linkedin.com/company/adam-the-automator-llc)
*   [](/feed/)

![Windows 10 Boot Time and Uptime: PowerShell Insights](https://adamtheautomator.com/wp-content/uploads/2019/08/computer-161501_1280.png)

# Windows 10 Boot Time and Uptime: PowerShell Insights

[![](https://secure.gravatar.com/avatar/06ab692f58fa7256ef14d0c099c863b6a12b9692e9c117a0337cc6468f359714?s=192&d=mm&r=g)Nathan Kasco](https://adamtheautomator.com/author/nate/)13 August 20195 min. read

Categories: [IT Ops](/category/it-ops/)

Tags:[Microsoft Windows Server](/tag/microsoft-windows-server/)[PowerShell](/tag/powershell/)

Table of Contents

*   [How to Check Boot Time in Windows 10 and Windows Server](#checking-windows-server-uptime)
*   [Task Manager](#task-manager)
*   [Event Viewer](#event-viewer)
*   [PowerShell](#powershell)
*   [WMIC](#wmic)
*   [System Information Utility](#system-information-utility)
*   [Net Statistics Command](#net-statistics-command)
*   [Uptime Command](#uptime-command)
*   [Introducing the Get-ServerUptimeReport script](#introducing-the-get-serveruptimereport-script)
*   [Finding Windows Uptime Across Many Servers](#finding-uptime-across-many-servers)
*   [Summary](#summary)

Windows uptime is a measurement that many server administrators use to troubleshoot day-to-day issues that may arise in the environment. In this article, you’re going to learn how to check boot time in Windows 10 and Windows Server. You’re free to use whichever way is easiest for you. Use this article as a future reference.

The article will be broken up into two main parts; checking server uptime and finding historical Windows uptime. The first part will focus on finding how much time the computer has been up since its last reboot. This is called “current” uptime in this article.

The second part of the article will focus on finding “historical” uptime meaning a reboot on how long a Windows system was up between multiple reboots. Using PowerShell, you’ll learn how to parse the Windows event log to pull historical uptime numbers.

## How to Check Boot Time in Windows 10 and Windows Server

To get started, let’s now jump into a few different ways to find the current Windows uptime.

You’ll be seeing a demonstration of how to check boot time in Windows 10 by running commands locally on a Windows system through this section. But know that by using [PowerShell Remoting](https://adamtheautomator.com/invoke-command/), you can also perform these checks remotely (excluding task manager).

### Task Manager

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

To check Windows uptime with Task Manager, right-click the Windows taskbar and select _Task Manager_ or press _Ctrl_–_Shift_–_Esc._ Once Task Manager is open, click on the _Performance_ tab. Under the Performance tab, you will see a label of _Up Time_.

![Finding Windows uptime with task manager](https://adamtheautomator.com/wp-content/uploads/2020/07/image-12.png)

Finding Windows uptime with task manager

### Event Viewer

Event Viewer 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 Event Viewer:

*   Bring up the Start Menu and simply search for _Event Viewer_, you can also get to it via _Computer Management_.
*   On the left, expand the Windows Logs section and select System
*   Now that we are querying only System related events, click “Filter Current Log…” on the right hand side of your window
*   In the Event ID field (by default this will be prefilled with text stating “All Event IDs”) we need to search for our applicable Event IDs, type “6005, 6006” then click OK

You can then compare the two times to create a total uptime. Also, since many instances of these events are stored, we can query the history of uptimes!

You now have filtered Event Logs that will show you not only the last time but all known times in which there has been a bootup/shut down.

### PowerShell

PowerShell has a few different ways you can retrieve uptime. You can either query WMI or use the Windows event log.

When querying WMI, you can query the _Win32\_OperatingSystem_ class and select the `LastBootUpTime` property as shown below.

```powershell
PS51> Get-CimInstance Win32_OperatingSystem | Select-Object LastBootUpTime

LastBootUpTime      
--------------      
9/25/2019 9:37:37 PM
```

To query the Event Log via PowerShell, use the `Get-WinEvent` cmdlet. You’ll need to search for event IDs 6005 or 6006 that indicate the last time the machine was started.

```powershell
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](https://docs.microsoft.com/en-us/windows/win32/wmisdk/wmic) provides a command-line interface for WMI and is a tried and true method that has been used for many years. To query via uptime via WMIC you query the _Win32\_OperatingSystem_ WMI class again although a bit under the covers. You can see below you can use the WMIC syntax `os get lastbootuptime` to return the last time the server was started.

```bash
> wmic os get lastbootuptime

LastBootUpTime             

20190925213737.500000-240
```

You do not have to download anything to leverage WMIC, as it comes pre-installed with Windows.

### System Information Utility

The [systeminfo command](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/systeminfo) displays detailed configuration info about a computer and can be used to query system uptime. By using the built-in [find command line tool](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/find) you can parse the text to retrieve the data you need.

Simply open up either Command Prompt or PowerShell and type `systeminfo | find`.

```bash
> systeminfo | find "System Boot Time:"

System Boot Time:          9/25/2019, 9:37:37 PM
```

You do not have to download anything to leverage `systeminfo`, as it comes pre-installed with Windows.

### Net Statistics Command

You can also quickly query uptime via Net Statistics or more commonly known as `net stats`. The `net stats` command returns general information about your session. You can see below the _Statistics since…_ line. This date indicates when the machine was started.

```bash
> net stats srv

Workstation Statistics for \\NATES-PC


Statistics since 9/25/2019 9:37:52 PM

--SNIP--

The command completed successfully.
```

### Uptime Command

If you need a small, portable utility to find Windows uptime, look no further than NeoSmart Technologies’ [Uptime command for Windows](https://neosmart.net/uptime/). 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.

After downloading the tool, extract _uptime.exe_ to _%WinDir%\\System32_. Then open up a command prompt and simply type `uptime`.

![Uptime tool](https://adamtheautomator.com/wp-content/uploads/2020/07/image-13.png)

Uptime tool

To run this tool remotely, you’d first need to copy the tool to the Windows systems you’re checking uptime on.

## Introducing the Get-ServerUptimeReport script

So you don’t have to write the PowerShell yourself, download a community script called _Get-ServerUptimeReport.ps1_.

```powershell
PS51> Install-Script -Name Get-ServerUptimeReport
```

This script allows you to provide a computer name as a parameter. It will then parse the _System_ event log of the computer and find both a start and stop event to compare the two. It will then return the total time the server was online until the event log has rolled.

Below is an example of using this script on a server. It will return the total uptime for all of the events the server has in the event log, including the current uptime.

```powershell
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 Across Many Servers

This script is a quick way to find the uptime of a single server across many days. But what if you need this information for lots of servers at once? To do this, you can gather up a list of servers and then pass each computer name, one at a time, to this script.

As an example, define all your servers in an array in the PowerShell console. In this example, the variable array will be called `$servers`.

In reality, though, you might be pulling server names from Active Directory, Hyper-V, or a text file. As long as you can build an array of server names, you’re fine.

Define all the server names and then iterate over each one with a loop, as shown below.

```powershell
$servers = 'WEBSRV1','SQLSRV1'
foreach ($server in $servers) {
	Get-ServerUptimeReport.ps1 -ComputerName $server
}

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 you can’t determine which server each row references. Add a server name to the output like below using a calculated property.

```powershell
$servers = 'WEBSRV1','SQLSRV1'
foreach ($server in $servers) {
	Get-ServerUptimeReport.ps1 -ComputerName $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 WEBSRV1
9/16/2017 10:42:52 AM 9/16/2017 12:42:34 PM 0.08 119.7 WEBSRV1
9/16/2017 2:42:17 PM 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 SQLSRV1
9/16/2017 10:22:49 AM 9/16/2017 12:22:36 PM 0.08 119.79 SQLSRV1
9/16/2017 3:22:12 PM 9/22/2017 4:35:01 PM 6.05 8712.81 SQLSRV1
```

We now have an excellent little tool that can provide us a quick report on uptime for our servers over time!

## **Summary**

You’ve now seen many different ways to find Windows uptime. Regardless of which option you choose, you’ll receive the same information. Choose the best one for your own context.

And remember if you need a historical report of uptime history, don’t forget about the `Get-ServerUptimeReport` PowerShell script!

Share this article

[Share on X](https://twitter.com/intent/tweet?url=https%3A%2F%2Fadamtheautomator.com%2Fwindows-uptime%2F&text=Windows%2010%20Boot%20Time%20and%20Uptime%3A%20PowerShell%20Insights)[Share on Facebook](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fadamtheautomator.com%2Fwindows-uptime%2F)[Share on LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fadamtheautomator.com%2Fwindows-uptime%2F)

## Related Posts

![](https://adamtheautomator.com/wp-content/uploads/2019/07/1-Pending-Restart-GUI-1-1.png)

### [Test Pending Reboot on Windows Servers with PowerShell](/pending-reboot-registry/)

Use PowerShell to quickly test pending reboot across Windows servers and consolidate steps into one script.

![](https://adamtheautomator.com/wp-content/uploads/2026/06/26995-troubleshoot-dns-issues-powershell-codex.webp)

### [Troubleshoot DNS Issues with PowerShell](/troubleshoot-dns-issues-powershell/)

Troubleshoot DNS issues with PowerShell by testing name resolution, DNS client settings, cache entries, and network connectivity in a repeatable workflow.

![](https://adamtheautomator.com/wp-content/uploads/2025/10/image_2025-10-24_095322075.png)

### [Migrating from PowerShell 6 to 7.5: Breaking Changes/New Features](/migrating-powershell-6-to-7-5/)

Migrate from PowerShell Core 6 to 7.5: breaking changes, features, and testing tips.

## Categories

*   [IT Ops](/category/it-ops/)
*   [Cloud](/category/cloud/)
*   [DevOps](/category/devops/)
*   [Home Ops](/category/home-ops/)
*   [Information Security](/category/infosec/)
*   [Software Development](/category/software-development/)

## Site

*   [Home](/)
*   [Tutorials](/tutorials/)
*   [Instructors](/author/)
*   [Advertising](/advertising/)
*   [Recommended Resources](/resources/)
*   [About Adam](/about-adam/)

Copyright 2026© ATA Learning | [Privacy Policy](/privacy/)
