One of the pieces of information I’m constantly needing is to know how long a server or user’s workstation has been up for. Using WMI and the LastBootupTime attribute makes this pretty easy! Introducing Get-Uptime! This is a simple, little script I use all the time. In fact I typically make this a function in a module. It’s great for when you’re in the console and want to check uptime real quick on a remote system.

Download this script on the Technet Script Repository