A quick one-liner to find out a Windows system’s uptime

Based on the info I found here, this one-liner is a quick way of displaying a Windows system’s uptime from the command prompt…

net stats srv | find "since"

Results in the following:

Statistics since 16/05/2013 2:32:48 PM

Oleg left me a comment with a more accurate one:

systeminfo | find "Boot Time"

Just remember that find.exe is case-sensitive unless you use the /i parameter

The “net stats srv” method I originally posted is a little less accurate (by mere seconds) as it’s based on when the Server service started:

image

Note: Edited to include a better, more accurate method

2 thoughts on “A quick one-liner to find out a Windows system’s uptime

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s