VBScript to find out last reboot time of multiple computers

I usually write quite a lot of scripts to automate tasks that would otherwise consume my whole day. I am a big fan of Microsoft PowerShell but occasionally do write a few scripts in VBScript. I uploaded one such script on the Technet Script Center. This VBScript uses the Win32_OperatingSystem WMI class to output the last reboot time of a computer specified in a text file.

The script can be viewed at the ScriptCenter Repository at the link below:

Last Reboot Timestamp


Comments (4)

  1. Hey Mey,

    Save the script as a .vbs file(for example, demo.vbs). Now, put all your computer names in a text file, one on each line in a text file (Lets take what's been referenced in the script C:ScriptsServers.txt)

    Now, just execute the script by double clicking on it or by opening a command prompt and executing the following command cscript C:Scriptsdemo.vbs (assuming that you have placed the demo.vbs file in the Scripts Directory on your C drive.That's all about it.

    P.S: Note that you need to administrative access on all the computers listed in the text file so that script can query the WMI class.


    Manoj R. Nair

  2. Mey says:

    Could you please guide me , How can i check this script in my environment?

  3. Carlos says:


    I tried your script againt my servers but the Reports came back with the same hours for ALL my servers.  985406 hours

    Any ideas?

  4. karthik says:

    Reports came back with the same hours

Skip to main content