I am trying to convert an event log file (.evtx) to xml using Power Shell (and later read this xml in a C# program). I am running the script
get-winevent -Path "C:\test.evtx" -oldest | convertto-xml -as Stream > "C:\test.xml"
but the resultant xml file has many events whose 'Message' field is EMPTY. If I open the same .evtx in Windows Event viewer, I can see messages of all events.
Though this problem is reported and people have talked about it (here & here), I am unable to find a solution / workaround for this.
Can anyone please tell me if there is something new availlable on this issue or any information that might be helpful.
PS: I am using Power shell version 2.0.
in Windows Event viewer, I can see messages of all events
... is there any special character (including comparison signs) in the messages that are missing in the XML?