![]() For instance, right now the script runs only on a local computer. In the end, HB, the script is a bit complicated believe it or not, there is still some more work to do on it. "This computes to $percentUptime percent uptime on $env:computerName for the current 30 day period" ![]() $totalDownTime = New-TimeSpan -start 0 -end 0 timespan]$downTime = New-TimeSpan -start 0 -end 0 The GetUpTimeFromSystemLog.ps1script is seen here. We simply need to look for startup entries and shutdown entries, obtain the time stamps from each event, subtract the amount of time between the two events et voila we have your uptime. We can use the Windows System Event log to obtain the information to satisfy your pointy-headed boss. Help me, Scripting Guy, you are my only hope.ĭon’t sweat it, HB. He said to really prove server uptime, I need to track the amount of time the server was down during the entire month, subtract if from the available time in the month, and then calculate the percentage. I bow at your feet! But guess what? My pointy-headed boss says that does not mean jack squat (or words to that effect). Hey, Scripting Guy! I loved your idea about tracking what time my server came up and subtracting it from the current time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |