title: Powershell parse get-winevent into csv with headers including all child objects
body: <p>I am using Powershell 4 and trying to parse an archived event log into a csv file that includes all of the data and has headers associated with them. The closest I have been able to come is by using the following command: </p>
  
  <pre><code>    Get-WinEvent -Path .\Security.evtx |Select-Object TimeCreated, ProviderName, Id, Message, Level, Keyword, UserID, Data, Subject, SubjectUserSid, SubjectUserName, SubjectLogonId, ComputerName | Export-Csv .\Logging.csv
  </code></pre>
  
  <p>This gives me all the header information for all of the fields in the csv file but the only fields that contain data are TimeCreated, ProviderName, ID, Level, &amp; Message. I am trying to get the missing data into columns also but not succeeding. So what am I doing wrong here?</p>