0

I am accessing an Event Log from a remote computer using method (e.g. EventLogQuery class) described in this question. And that works.

What I am trying to do is to change the query to only bring back Information level entries from the last 24 hours.

In the linked question, the query is *[System/Level=2]. How do I include the dates and level into the query.

AngryHacker
  • 59,598
  • 102
  • 325
  • 594

1 Answers1

0

Answering my own question in case anyone ever needed this. There is a really easy way to generate the query that you want.

  1. In the Event Log, right click on Custom Views and select Create Custom Views
  2. Select all settings that you want.
  3. Switch to the XML tab.

Now you have the query that you want.

AngryHacker
  • 59,598
  • 102
  • 325
  • 594