Windows OS Hub
  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows 10
    • Windows Server 2025
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
    • Proxmox
  • PowerShell
  • Linux

 Windows OS Hub / Windows 11 / Get the Computer Uptime (Last Boot Time) on Windows

January 13, 2025

Get the Computer Uptime (Last Boot Time) on Windows

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.

  1. Open the Task Manager (run the taskmgr.exe command or press the Ctrl+Shift+Esc)
  2. Go to the Performance tab -> select CPU
  3. Check the Up time value view Windows uptime in task manager

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).

systeminfo - get system boot time

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

Get system uptime with PowerShell

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

Get-Uptime cmdlet in PowerShell Core 7.x

You can also use PowerShell to display a Windows’ last boot date/time and the name of the user who restarted the computer: How to check who shutdown or restart Windows?

You can get uptime from a remote computer:

$remotePC='hqpc12b23'
(Get-Date) - (Get-CimInstance Win32_OperatingSystem -ComputerName $remotePC).LastBootupT
ime

This command can be used to remotely query the uptime of multiple computers in an AD domain. The Get-ADComputer cmdlet is typically used to get a list of domain-joined computers.

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.

0 comment
0
Facebook Twitter Google + Pinterest
PowerShellQuestions and AnswersWindows 10Windows 11
previous post
Enable Automatic System Registry Backup on Windows 10/11
next post
VPN Error 633: The modem is already in use or not configured

Related Reading

Create a Custom Windows Image with Pre-installed Apps

February 28, 2024

Upgrading to Windows 11 on Unsupported Hardware

March 6, 2024

How to Assign (Passthrough) a Physical GPU to...

June 11, 2024

Configuring RemoteApps Hosted on Windows 10/11 (without Windows...

January 25, 2025

Disable BitLocker Automatic Drive Encryption in Windows 11

October 16, 2024

Fix: Your IT Administrator Has Limited Access to...

March 22, 2024

Enable Hyper-V on Windows 10/11 Pro and Home...

August 12, 2024

Get Started with Docker on Windows (WSL2) without...

September 4, 2024

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Encrypt Any Client-Server App Traffic on Windows with Stunnel

    June 12, 2025
  • Failed to Open the Group Policy Object on a Computer

    June 2, 2025
  • Remote Desktop Printing with RD Easy Print Redirection

    June 2, 2025
  • Disable the Lock Screen Widgets in Windows 11

    May 26, 2025
  • Configuring Windows Protected Print Mode (WPP)

    May 19, 2025
  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Assign (Passthrough) a Physical GPU to a Hyper-V Virtual Machine
  • Run PowerShell Scripts on a Schedule with Task Scheduler
  • Check Windows 11 Hardware Readiness with PowerShell Script
  • Extend an Expired User Password in Active Directory
  • How to Add or Remove Pinned Folders to Quick Access with PowerShell and GPO
  • How to Enable and Configure Wake-on-LAN (WoL) in Windows
  • How to Find Windows Version and Build Number Installed
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top