Jan 232013

Checking System Uptime

In a previous tip we explained how you read date and time information from WMI and convert it into a regular date and time information. With this technique, you can then manipulate and calculate with the regular date and time functions. So, this piece of code returns the days a given system is running since the last reboot was done:





‘Your system is running for {0:0.0} days.’-f$days

from PowerShell

Leave a Reply