Tuesday, August 20, 2013

Query a bunch of Windows 2003 event logs

for /f %A IN ('type systems.txt') DO (
cscript.exe C:\windows\system32\EVENTQUERY.vbs /S %A /FI "ID eq 3001" /L Application >> list.txt
)

This will find event ID 3001 in the Application log file with a list of computers from "systems.txt"

No comments: