This will read the windows event logs based on the supplied xpath filters and email the specified addresses if there are matches.

It sends a single email if there are no events that need notifying about.

It reads the given directories for xml files. It then loads these and filters the event log based on them. Which event log is read is based on which directory the xml files are in. They should all be in the Filters folder i.e.

\Filters\Security\audit.xml

This will load the contents of the auidit xml file and query the security log.

The frequency of checking, and how far back to check are set in the app.config.

The email addresses are definied in the app.config, separated by a ;

This is not pretty code but it does the job.

Last edited Oct 8, 2012 at 3:49 PM by rbuggins, version 4