Check System Uptime (Last Boot Time) on Windows Using PowerShell [Guide]
Have you ever wondered how long your Windows PC has been running without a restart? Maybe you’re troubleshooting a slow computer, checking whether a recent restart actually happened, or simply curious about when you last turned on your system. Whatever the reason, checking system uptime can give you a quick answer.
Windows offers several ways to find this information, but PowerShell is one of the easiest options once you know which command to use. You don’t need to install any additional software, and you can check your system’s last boot time in just a few seconds.
In this guide, you’ll learn how to check system uptime and the last boot time on Windows 11 and Windows 10 using PowerShell.
Check System Uptime (Last Boot Time) on Windows Using PowerShell

To check system uptime on Windows, open PowerShell and run (Get-Date) – (Get-CimInstance Win32_OperatingSystem).LastBootUpTime. This command calculates how much time has passed since Windows last started. To check the last boot time directly, run (Get-CimInstance Win32_OperatingSystem).LastBootUpTime.
These commands work on Windows 10 and Windows 11. You can run them in a regular PowerShell window without administrator privileges on most personal computers.
Let’s go through the methods step by step so you can choose the one that works best for you.
1: Open PowerShell on Your Windows PC
Before checking your system’s uptime, you need to open PowerShell. It’s a Windows command-line tool that lets you run commands to retrieve system information, manage settings, and troubleshoot common problems.
Start by clicking the Start button on your taskbar. You can also press the Windows key on your keyboard to open the Start menu.
Type PowerShell into the search box. Windows should display an application named Windows PowerShell or PowerShell, depending on your installation.
Click the application to open it. A terminal window will appear with a prompt where you can type commands.
You usually don’t need to select Run as administrator for the uptime commands in this guide. A standard PowerShell window is generally enough.
If you’re using Windows 11 and see Windows Terminal instead, that’s fine. You can open a PowerShell tab inside Windows Terminal and run the same commands.
2: Check the Last Boot Time Using PowerShell
The last boot time tells you the date and time Windows most recently started. This information can help you confirm whether your PC restarted after an update or determine when its current session began.
Once PowerShell is open, copy the following command:
(Get-CimInstance Win32_OperatingSystem).LastBootUpTime
Paste it into the PowerShell window and press Enter.
PowerShell will display a date and time. For example, you might see a result similar to this:
Monday, October 12, 2026 8:15:30 AM
This is an example only. Your actual result will depend on when your computer last started.
The displayed date tells you the day Windows started, while the time shows when that startup occurred. You can compare this information with your update history or troubleshooting notes to see whether a restart took place.
Keep in mind that the command reports the operating system’s last boot time, not the time you last signed in to your account or opened a particular application.
3: Calculate System Uptime in Days, Hours, Minutes, and Seconds
Knowing the last boot time is useful, but sometimes you want a more direct answer. For example, you may want to know whether your PC has been running for three hours, two days, or an entire week.
PowerShell can calculate this automatically by subtracting the last boot time from the current date and time.
Enter this command:
(Get-Date) – (Get-CimInstance Win32_OperatingSystem).LastBootUpTime
Press Enter to run it.
PowerShell will display a time interval, usually in a format containing days, hours, minutes, seconds, and fractions of a second.
For example, the output might look like this:
Days : 1
Hours : 4
Minutes : 25
Seconds : 10
In this example, Windows has been running for approximately 1 day, 4 hours, 25 minutes, and 10 seconds.
Your result will be different because the command uses your PC’s current time and recorded boot time.
This method is especially helpful when troubleshooting performance problems. If your computer has been running for several days without a restart, you can restart it and check whether the issue improves.
4: Display System Uptime in a Simple, Readable Format
If you prefer a single line instead of PowerShell’s default time-span output, you can use a slightly more detailed command.
Copy and run this command:
$boot = (Get-CimInstance Win32_OperatingSystem).LastBootUpTime; $up = (Get-Date) – $boot; “Last boot: $bootnUptime: (up.Days) days, (up.Hours) hours, (up.Minutes) minutes, (up.Seconds) seconds”`
Press Enter after pasting the entire command.
PowerShell will display two useful pieces of information. The first line shows the last boot time, while the second line shows the system’s uptime in days, hours, minutes, and seconds.
For example, the result might look like this:
Last boot: 10/12/2026 8:15:30 AM
Uptime: 1 days, 4 hours, 25 minutes, 10 seconds
The values above are only examples. Your computer will display its own boot time and uptime.
This method is convenient if you frequently check system uptime and want both results in one place.
5: Check System Uptime Using Get-CimInstance With More Details
PowerShell can also retrieve additional information about your Windows installation, including the last boot time and operating system details.
Run this command:
Get-CimInstance Win32_OperatingSystem | Select-Object Caption, LastBootUpTime
Press Enter.
PowerShell will display the Windows operating system name and its last boot time. For example, the output may include your Windows edition and a timestamp showing when the system last started.
This method is useful when you’re troubleshooting multiple computers or documenting system information for technical support.
You can also retrieve the last boot time and immediately calculate the uptime using a short PowerShell script:
$os = Get-CimInstance Win32_OperatingSystem; $uptime = (Get-Date) – $os.LastBootUpTime; [PSCustomObject]@{ Windows = $os.Caption; LastBootTime = $os.LastBootUpTime; Uptime = $uptime }
This command gathers the operating system name, last boot time, and uptime into a single structured result.
You don’t need to understand every part of the script to use it. Copy the entire command, paste it into PowerShell, and press Enter. The output will be organized into clearly labeled fields.
Check Whether Windows Fast Startup Affects Your Results
If you’ve checked your uptime and noticed that it doesn’t seem to match the last time you shut down your computer, Fast Startup may be part of the explanation.
Fast Startup is a Windows feature that saves some system kernel state during shutdown to help the next startup happen faster. When it’s enabled, a normal shutdown followed by powering on the PC may not behave like a full Windows restart.
As a result, the last boot time reported by Windows may not change after every shutdown and power-on cycle.
To check the difference, open PowerShell and run:
(Get-CimInstance Win32_OperatingSystem).LastBootUpTime
Write down the result. Then select Start > Power > Restart. After Windows loads again, run the same command.
A restart performs a full Windows restart rather than using the usual Fast Startup shutdown path. You should see a new boot time reflecting that restart.
If you’re troubleshooting a Windows issue, using Restart is often a better first step than shutting down and turning the computer back on.
Check System Uptime Using an Alternative PowerShell Command
If you want another way to check how long Windows has been running, you can use the Get-Date command with the last boot time.
Run this command:
bootTime=(Get-CimInstanceWin32OperatingSystem).LastBootUpTime;(Get-Date).Subtract(bootTime)
Press Enter.
This command calculates the difference between the current time and the last boot time. The result is a TimeSpan value, which represents the elapsed time between two timestamps.
You can use this approach when creating your own PowerShell scripts or adding uptime information to a troubleshooting report.
For most beginners, however, the command from Step 3 is easier to remember and provides the same essential information.
FAQs
1. Can I check Windows uptime without administrator access?
Yes. On most Windows 10 and Windows 11 computers, you can run the uptime commands in a regular PowerShell window. Administrator privileges generally aren’t required to read this information.
2. What is the difference between system uptime and last boot time?
Last boot time tells you when Windows last started. System uptime tells you how much time has passed since that startup. You can use the boot time to calculate uptime, or let PowerShell calculate it for you.
3. Does restarting my computer reset system uptime?
Yes. A normal Windows restart starts a new operating system session and resets the uptime counter. Your last boot time should also update to reflect the restart.
4. Why does my Windows uptime seem incorrect?
Fast Startup can affect how a shutdown and subsequent power-on are reflected in the reported boot time. A sleep or hibernation session can also make the computer’s apparent running time differ from the time you’ve actively used it. Try selecting Restart and checking the result again.
5. Can I check the last boot time on another Windows computer?
Yes, if you have the necessary network access, permissions, and remote management configuration. For example, you can use Get-CimInstance Win32_OperatingSystem -ComputerName PC-NAME after replacing PC-NAME with the target computer’s name. Remote access may require additional configuration, and the command won’t work in every environment.
Summary
Checking system uptime is a simple way to find out how long your Windows computer has been running and when it last started. With PowerShell, you can retrieve this information without installing additional software or navigating through multiple settings screens.
To check the last boot time, run (Get-CimInstance Win32_OperatingSystem).LastBootUpTime. To calculate the elapsed time since startup, run (Get-Date) – (Get-CimInstance Win32_OperatingSystem).LastBootUpTime.
You can also display both values together, retrieve additional operating system details, and account for Fast Startup when the results seem unexpected.
