سؤال

The following query doesn't seem to filter off any events using EventLogQuery.

Can anyone offer any support on how to get round this problem of filtering off any events in the query?

This works (gives me errors from the event log):

*[System[(Level=1 or Level=2)]

This doesn't work (I want to filter off events):

*[System[(Level=1 or Level=2) and (ErrorID!=1001)]]
*[System[(Level=1 or Level=2) and (ErrorID<>1001)]]
*[System[(Level=1 or Level=2) and (ErrorID!='1001')]]
*[System[(Level=1 or Level=2) and (ErrorID<>'1001')]]

Any ideas as to how to get this to work?

هل كانت مفيدة؟

المحلول

Stupid mistake. It should be EventID not ErrorID.

*[System[(Level=1 or Level=2) and (ErrorID!=1001)]]
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top