This is provided ‘AS IS’ with no warranties, and confers no rights. Use of included samples are subject to the terms specified at Microsoft
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
Could you please guide me , How can i check this script in my environment?
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:\Scripts\Servers.txt)
Now, just execute the script by double clicking on it or by opening a command prompt and executing the following command cscript C:\Scripts\demo.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
I tried your script againt my servers but the Reports came back with the same hours for ALL my servers. 985406 hours