less than 1 minute read

If you need to trawl through your production server event logs. Here’s a quick tip for extracting just the entries for a given date range using LogParser. BTW Visual LogParser is a must have, it even downloads and automatically installs the latest version of LogParer from MS.

SELECT  TimeGenerated, SourceName, ComputerName, Message FROM C:\Downloads\May09-ErrorLog\AppLog\*.evt
WHERE TimeGenerated BETWEEN timestamp('04/04/2009', 'dd/MM/yyyy') and timestamp('06/04/2009', 'dd/MM/yyyy')
ORDER BY TimeGenerated desc