I need to save windows event logs in some file, now i am using:
var els = new EventLogSession();
els.ExportLogAndMessages("Application", PathType.LogName, "*", Path.Combine("c:\\Application.evtx"), false, CultureInfo.CurrentCulture);
this works fine but i want to get logs between DateTime
range, i suspect that 3rd parameter in ExportLogAndMessages
"query" may help me.
now how to write this "query", and if "query" doesn't help is there anyway to do that.