Guys,
Here is my issue I have a batch job that runs log parser to collect the event logs from my servers and dumps the info into an excel spreadsheet.
Some times it works perfectly and some times it does not. The record titles like computername or timegenerated some times show up in the spreadsheet and other times it does not not.
Any idea why. I do have other batch files that run thru out the day looking the servers for specfic event log error messages like account lockouts but the one listed below only runs once per day.
I even run it from a different machine and I get the same results
Any help would be appreciated.
for /f %%i in (servers.txt) do logparser "select distinct timegenerated,EventID,EventTypeName,Strings,ComputerName,Message into eventlogs.csv from \\%%i\application where eventtypename like 'error event' and timegenerated >= to_localtime (sub(system_timestamp(), timestamp ('23','hh') ) ) order by timegenerated " -i:evt -o:csv -filemode:0