See if this works for you. I discovered that if you point wevtutil.exe directly at the event log .evtx file, it won't try to process the EventMessageFile. It just dumps the XML. I traced it with Process Monitor and did not see any eventlog registry reads. I used my Application log to test.
cls
$xml = New-Object -TypeName XML
$data = wevtutil.exe qe /c:10 /rd:true /lf C:\Windows\System32\winevt\Logs\Application.evtx
$data = "<AllEvents>" + $data + "</AllEvents>"
$xml.LoadXml($data)
foreach ($e in $xml.AllEvents.Event) {
[PSCustomObject] @{
TOD = ([datetime]($e.System.TimeCreated).SystemTime).ToString("yyyy-MM-dd HH:mm:ss")
EventID = $e.System.EventID.'#text'
Provider = $e.System.Provider.Name
Data = $e.EventData.Data -join ","
}
}
The down side to this is that even if the event source is registered, you won't get the formatted message, you just get the data that plugs into the message.