Hello, in this section i want to know how to filter an event which contain Data with some words, for example:
Right Syntax:
*[EventData[Data[@Name='SourceAddress'] ='192.168.1.2']]
result: search all Events which Source Address = 192.168.1.2.
but i want to search all Events which contain LIKE 192.168.
Wrong Syntax:
*[EventData[Data[@Name='SourceAddress'] Like '192.168.']]
Best Answer
I want to search all Events which contain LIKE 192.168.
Unfortunately I don't think that is directly possible, because:
Source Advanced XML filtering in the Windows Event Viewer
However, as w32sh pointed out in a comment, it is possible with PowerShell. See this Stack Overflow question: Using XPath starts-with or contains functions to search Windows event logs