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
Solved

Checking Windows Server 2003 Reboot in Event Viewer

Posted on 2006-06-27
3
4,451 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 125 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Many of us in IT utilize a combination of roaming profiles and folder redirection to ensure user information carries over from one workstation to another; in my environment, it was to enable virtualization without needing a separate desktop for each…
An article on effective troubleshooting
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

808 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