tags:

views:

24

answers:

0

Hie all,

I get through WMI Evenlogs matching specific criteria like Sourcename and Description and it's ok for that part.

Now i'd like to get the same thing but in the 5 or 10 last minutes.

I tried to use TimeGenerated and TimeWritten form the Win32_NTLogEvent but no success

here is my basic query with no time: SELECT Logfile, Message, SourceName FROM Win32_NTLogEvent WHERE Logfile = 'test' AND Sourcename = 'titi42' AND Message LIKE '%PEN%'

my goal is that answers of this query only returns something if the eventlog is less than 5 or 10 minutes old

Thank you in advance.

-- mike