Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Find a given event id for a list of computers in a text file

Avatar of Simon336697
Simon336697Flag for Australia asked on
VB Script
2 Comments1 Solution427 ViewsLast Modified:
Hi guys.

Im trying to build a script that will do the following.

script.vbs or .bat -e <event_viewer_id> <-h <number_of_hrs> or -a <get_all_events> -l computers.txt -o outputevents.txt

So, for example, if I wanted to get event id 6008 for the last 7 hours,

script.vbs -e 6008 -h 8 -l computers.txt -o outputevents.txt

or to get all events:

script.vbs -e 6008 -a -l computers.txt -o outputevents.txt

Format for the outputevents.txt would be something like:

======================================================== outputevents.txt

----------------------- <computer_name>:
6008      <time_date>   <-------------- most recent first
6008        time_date
6008
etc

----------------------- <computer_name>:
6008      <time_date>   <-------------- most recent first
6008        time_date
6008
etc

----------------------- <computer_name>:
6008      <time_date>   <-------------- most recent first
6008        time_date
6008
etc

Any help on this greatly appreciated.

ASKER CERTIFIED SOLUTION
Avatar of jwarnken
jwarnkenFlag of United States of America image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Commented:
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answers