?
Solved

Checking Windows Server 2003 Reboot in Event Viewer

Posted on 2006-06-27
3
Medium Priority
?
4,459 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

A brief overview to explain gateways, default gateways and static routes OR NO - you CANNOT have two default gateways on the same server, PC or other Windows-based network device. In simple terms a gateway is formed when a computer such as a serv…
Resolve DNS query failed errors for Exchange
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…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

719 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