cmd uptime is the practice of retrieving Windows OS uptime via Command Prompt using built-in tools like systeminfo, net statistics workstation, WMIC, or the legacy uptime.exe utility.
systeminfo | find "System Boot Time"
Why Windows system uptime matters
In production Windows environments, knowing the exact system uptime is critical before applying patches, rebooting for maintenance, or investigating performance degradation. A server running for 300+ days may indicate a pending stability issue or missed update cycles. For example, in a fleet of 200+ Windows Server 2019/2022 instances across four data centers, verifying each machine’s uptime before any scheduled reboot is standard procedure.
Methods to check uptime in Windows CMD
Below are the verified commands for retrieving uptime on Windows, each with its own characteristics and caveats.
- Local check with systeminfo
systeminfo | find "System Boot Time"Works on English systems. On non-English OS, use
findstr /i "boot"instead. Output gives local time of last boot; uptime must be calculated manually.Result:
System Boot Time: 10/14/2024, 9:30:15 AM - Using net statistics for quick uptime
net statistics workstation | find "Statistics since"Returns the date/time when the workstation service started, which closely matches system boot. No calculation needed.
- WMIC for direct uptime in minutes
wmic os get lastbootuptimeOutputs
YYYYMMDDHHMMSS.ffffff+ZZZformat. Parse viafor /fin batch scripts to compute hours. - PowerShell one-liner via cmd
powershell "Get-CimInstance -ClassName Win32_OperatingSystem | select LastBootUpTime"Returns a proper datetime object. On older systems (pre-PowerShell 3.0), fall back to WMIC.
- uptime.exe for legacy systems
uptime.exeDownloaded from Microsoft’s Windows Server Resource Kit and copied to
C:WindowsSystem32. Output:System uptime: 12 days 4 hours 31 minutes 15 seconds. Works on Windows XP/2003/7.
Command Cheat Sheet
| Action | CMD Command | Key Flag | Description |
|---|---|---|---|
| Get boot time (English) | systeminfo | find “System Boot Time” | N/A | Shows last boot time in local format. |
| Get boot time (any language) | systeminfo | findstr /i “boot” | /i (case-insensitive) | Matches “Boot” or “boot” in any language. |
| Get uptime from workstation service | net statistics workstation | find “Statistics since” | N/A | Shows when the workstation service started. |
| Get last boot UTC via WMIC | wmic os get lastbootuptime | N/A | Returns YYYYMMDDHHMMSS format. |
| Get last boot via PowerShell | powershell “Get-CimInstance Win32_OperatingSystem | select LastBootUpTime” | N/A | Requires PowerShell 3.0+; returns datetime. |
| Direct uptime display | uptime.exe | N/A | Resource Kit tool; shows days/hours/minutes. |
Common pitfalls and lessons learned
- Locale breakage:
find "System Boot Time"fails on German Windows (outputs “Systemstart”). Use a generic filter likefindstr /i "boot"or switch to WMIC. - Wrong trust in uptime.exe: The utility reports uptime since the last kernel boot, but if the system entered hibernation, the counter continues — leading to inflated values. For post-hibernation accuracy, use
systeminfo. - Security permissions: On domain controllers,
net statistics workstationmight not be available if the Workstation service is disabled. Prefer WMIC or PowerShell. - Error 0xc0000098: This Windows boot error can cause no boot time to be shown. The actual cause is a corrupted BCD, not a command failure. Verify with multiple methods.
- Automation overhead: Running
systeminfoon many remote machines over WinRM caused high network latency. Usewmic /node:server1 os get lastbootuptimeto reduce traffic.
Frequently Asked Questions
How often should I check system uptime?
Check uptime when troubleshooting, during performance assessments, or before maintenance. Automated tools can ensure continuous monitoring.
How do IT admins manage uptime effectively?
IT admins monitor performance, schedule maintenance, and use monitoring tools for efficient uptime management.
Why is my system uptime incorrect?
Incorrect system clock settings, power interruptions, or Windows hibernation settings can cause inaccurate uptime readings. Verify with multiple commands.
Does uptime.exe work on Windows 10/11?
uptime.exe from the Resource Kit works on Windows 10/11, but Microsoft recommends using PowerShell or WMIC for modern systems.
What about the Linux “uptime” command on Windows?
The Linux uptime command is not available in Windows CMD. Use systeminfo, WMIC, or PowerShell instead.

Command Line Expert & Software Engineer
Welcome! I’m Thomas Heinrich, a software engineer and system administrator with a deep passion for the Command Line Interface (CLI). With years of experience navigating the terminal, building backend architectures, and automating server deployments, I created this space to share practical, real-world terminal knowledge.
Whether you are a beginner taking your first steps in a Linux environment or a seasoned DevOps engineer looking to optimize your deployment scripts, you will find actionable solutions here. My goal is to help you ditch the mouse, speed up your workflow, and harness the full power of the command line.