Uptime PowerShell Script / Command

Last Updated on

Linux / Unix users are accustomed to issuing an uptime command and being returned with the current systems duration since last boot.  Windows on the other hand, does not have such a native command (that I am aware of) – placing this script in your path can yield the same results as the nix’ equivalent in a Wintel environment.

1
2
// uptime.ps1
(get-date) - (gcim Win32_OperatingSystem).LastBootUpTime
Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Leave a Reply