Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Checking Windows Server 2003 Reboot in Event Viewer

Posted on 2006-06-27
3
Medium Priority
?
4,462 Views
Last Modified: 2012-08-14
How can you tell that a server has been rebooted in Windows 2003 Server? Can you tell in Event Viewer? Or is their a better way? Thanks.

-Brian
0
Comment
Question by:Calv1n
3 Comments
 
LVL 48

Expert Comment

by:Jay_Jay70
ID: 16993132
event viewer is the best way, just look for when the services all give a successful start
0
 
LVL 13

Expert Comment

by:2hype
ID: 16993869
Yeah, You can check event view and there is information like when DHCP entered the running state ect..

Or you could Open Notepad.  Paste the Below Code in.  Save it as uptime.vbs - Now double click the file.  This file will tell you how many hours the computer has been running for since last reboot.

' Check for computers last reboot
 
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
    ("Select * from Win32_OperatingSystem")

Dim uptime
 
For Each objOS in colOperatingSystems
    dtmBootup = objOS.LastBootUpTime
    dtmLastBootupTime = WMIDateStringToDate(dtmBootup)
    dtmSystemUptime = DateDiff("h", dtmLastBootUpTime, Now)
    uptime = dtmSystemUptime
Next
Function WMIDateStringToDate(dtmBootup)
    WMIDateStringToDate = CDate(Mid(dtmBootup, 5, 2) & "/" & _
             Mid(dtmBootup, 7, 2) & "/" & Left(dtmBootup, 4) _
                 & " " & Mid (dtmBootup, 9, 2) & ":" & _
                     Mid(dtmBootup, 11, 2) & ":" & Mid(dtmBootup, _
                         13, 2))
End Function

WScript.Echo uptime
0
 
LVL 5

Accepted Solution

by:
davino_1 earned 500 total points
ID: 16996865
You can also do a "systeminfo" in the command prompt and look at the uptime.  This won't necessarily tell you if it was a sucessful reboot or not...
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
This is the first one of a series of articles I’ll be writing to address technical issues that are always referred to as network problems. The network boundaries have changed, therefore having an understanding of how each piece in the network  puzzl…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question