View Single Post
  #1 (permalink)  
Old March 28th, 2007, 01:25 PM
brennanc brennanc is offline
Registered User
 
Join Date: Mar 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Selecting Event Logs in VBScript

I am trying to use VBScript & WMI to read the Security Event Log for specific Event ID's and a date range... the following Select statement works properly using the Logfile= 'Security' and Date range, but ignores the Event ID's.

strSQL = "Select * from Win32_NTLogEvent Where Logfile = 'Security' And EventCode = 529 Or Envent Code = 530 And TimeWritten >= '" & dtmStartDate & "' and TimeWritten < '" & dtmEndDate & "'"

Does anyone have any ideas?

Reply With Quote