Results 1 to 2 of 2

Thread: Find last restart time

  1. #1
    George Guest

    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.

  2. #2
    urkec Guest

    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.


Similar Threads

  1. Unable to find QuickTime after restart the computer
    By Kim|ball in forum Windows Software
    Replies: 5
    Last Post: 19-04-2011, 10:16 AM
  2. chkdsk starts every time I restart the computer
    By =?Utf-8?B?QmVlcmRhd2c=?= in forum Windows XP Support
    Replies: 7
    Last Post: 26-06-2009, 02:21 PM
  3. No time to Restart?
    By Anas in forum Operating Systems
    Replies: 3
    Last Post: 07-03-2009, 04:59 PM
  4. Replies: 3
    Last Post: 24-02-2009, 08:15 PM
  5. My computer does not restart each time
    By TechBook in forum Hardware Peripherals
    Replies: 5
    Last Post: 28-11-2008, 05:54 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,296,744.73006 seconds with 17 queries