You are here

uptime

PowerShell With Uptime - Getting Days Only

There is a handy and free tool to check your system's uptime called "Uptime".  (Clever, no?)  It can be downloaded at http://uptimeexe.codeplex.com.

While it is very easy to use (just navigate to it in a command window and type "uptime"), it doesn't give much of an option for formatting the output to include only the days.  So, a simple workaround is to use some "replace" commands within PowerShell and only output the number of days.  Here's how:

PowerShell - Get Boot Time of Computer

Show Date/Time Of Last Boot

​Get-WmiObject -class Win32_OperatingSystem | Select-Object __SERVER,@{label='LastBootUpTime';expression={$_.ConvertToDateTime($_.LastBootUpTime)}}
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
10 + 2 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer