I have an existing script, let's say this:
set cimv2=getobject("winmgmts:root\cimv2")
set evcol=cimv2.execquery("select * from win32_ntlogevent where logfile='System' and (sourcename='Microsoft-Windows-Kernel-General' or sourcename='Disk')")
for each evt in evcol
wscript.echo evt.timewritten & ": " & evt.sourcename & ", " & evt.type & ", " & evt.eventcode & ", " & evt.message
next
Is there a way that I can query the Windows Event Log using XPath query instead of WMI select query?
For example:
*[System[Provider[@Name='Microsoft-Windows-Disk' or @Name='Microsoft-Windows-Kernel-General']]]
Edit: I still want to have VBscript Collection as an object, not just execute "wevtutil".