I have been having problem with a computer with random reboots, and hanging on restart. I wanted to know how long the computer had been unavailable. I decided to use System Event ID 12 as the startup event for the purposes of my calculations. The script takes these steps: 1) connect to the remote system and get the oldest event from the System Log. Use this as the earliest start date for queries. 2) Collect all the startup events from user selected date. 3) For each startup event, collect the event immediately previous by record number. 4) Calculate the difference.Script Text
Get Downtime Using PowerShell
Leave a Reply
You must be logged in to post a comment.