title: How to get event message using Powershell?
body: <pre><code>$FilterXML = '&lt;QueryList&gt;
                  &lt;Query Id="0" Path="System"&gt;
                      &lt;Select Path="System"&gt;*[System[Provider[@Name="Service Control Manager"] and (Level=2)]]&lt;/Select&gt;
                  &lt;/Query&gt;
               &lt;/QueryList&gt;'
  $Errors = Get-WinEvent -FilterXml $FilterXML
  $Errors = $Errors | ?{ $_.ToXml().Contains("SomeService") }
  </code></pre>
  
  <p>Problem is that for every object, Message property is null. I can get some info using method .ToXml(), but I can't get message that you could see in windows event viewer under general tab.</p>
  
  <p>If I use Get-EventLog cmdlet, the message property returns string
   about some error.</p>
  
  <blockquote>
    <p>The description for Event ID '-1073734793' in Source 'Service Control
    Manager' cannot be found.  The local computer may not have the
    necessary registry information or mess age DLL files to display the
    message, or you may not have permission to access them.  The following
    information is part of the event:'SomeService', '2', '0',  '3', 'Run
    the configured recovery program'</p>
  </blockquote>