Simon336697
asked on
Find a given event id for a list of computers in a text file
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.
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:
==========================
----------------------- <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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER