Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Find last restart time

Windows Server Help


Reply
 
Thread Tools Search this Thread
  #1  
Old 12-03-2007
George
 
Posts: n/a
Find last restart time

Hello,

Please help me to find the 'last system restart time' for a group of servers
in Windows 2003 AD using VB script. At present we are using 'net statistics '
command to find the last restart time in each servers.

Thanks.

Reply With Quote
  #2  
Old 14-03-2007
urkec
 
Posts: n/a
RE: Find last restart time

You can use WMI Win32_OperatingSystem class:

strComputer = "."

Set objWMIService = GetObject("winmgmts:" & _
"{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\cimv2")

Set colOS = objWMIService.ExecQuery _
("SELECT * FROM Win32_OperatingSystem")

For Each objOS in colOS
WScript.Echo objOS.LastBootUpTime
Next

This gets the last bootup time for the local computer. I hope it gets you
started.

--
urkec


"George" wrote:

> Hello,
>
> Please help me to find the 'last system restart time' for a group of servers
> in Windows 2003 AD using VB script. At present we are using 'net statistics '
> command to find the last restart time in each servers.
>
> Thanks.

Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Windows Server Help
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Find last restart time"
Thread Thread Starter Forum Replies Last Post
Unable to find QuickTime after restart the computer Kim|ball Windows Software 5 19-04-2011 10:16 AM
chkdsk starts every time I restart the computer =?Utf-8?B?QmVlcmRhd2c=?= Windows XP Support 7 26-06-2009 02:21 PM
No time to Restart? Anas Operating Systems 3 07-03-2009 04:59 PM
Schedule the Windows XP to restart and get shutdown at the specific time Anand D. Operating Systems 3 24-02-2009 08:15 PM
My computer does not restart each time TechBook Hardware Peripherals 5 28-11-2008 05:54 PM


All times are GMT +5.5. The time now is 04:40 PM.