Scripting dilemma
Hi Folks, I hope this is an appropriate forum for this question, which relates to a scripting query...
Each day I need to investigate any workstations that haven't updated their virus software. After viewing the logs and identifying the IP's, I then ping each individually and make note of any echo responses/failures for follow-up later.
In an attempt to script as much of this as possible, I've come up with the following required steps, with any scripting I have so far, but it's not complete and I'm looking to you all for some help... VBS is preferred but not essential, although I'm trying to focus my learning on vbs
The aim is to ping a specified list of IP addresses each day and return all of the results to a file, with the following steps:
1) Manually enter IP list in to a txt/xls/script/other file... whatever is most appropriate (ie: hostlist.txt)
2) Create a new file which will store the results and append the date to the file name (ie: results-month/day.txt)... Scripting the new file is easy enough (below) but the date bit eludes me so far...
Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.CreateTextFile("C:\stuff\ping\blah.txt")
3) Ping IP's listed in hostlist file (2 echo requests only) and output all results to current results file... I know of the Win32_PingStatus function for XP/2003, but am trying to make this 2000 compatible if possible, the only way I am familiar with for 2000 is a batch file or the like, which wouldn't be able to import variables from the hostlist file...
I'm desperately hoping there's a solution to suit Windows 2000, and look forward to any help!
Thanks Much in advance!
Started By Herbus on Apr 2, 2004 at 6:59:42 PM |