title: How to convert text file to csv in powershell?
body: <p>I have a text file. Each line record an event and the fields are delimited by '|'.
  Is it possible using some cmdlet like "get-content event.log | export-csv event.csv" to convert text file to csv file?</p>
  
  <pre><code>xxx(1365)|2016-09-29 06:00:00.0|2016-09-29 06:30:00.0|
  bbb(110)|2016-09-29 06:30:00.0|2016-09-29 07:00:00.0|
  ccc(5243)|2016-09-29 07:00:00.0|2016-09-29 07:30:00.0|
  ddd(1950)|2016-09-29 07:30:00.0|2016-09-29 08:00:00.0|
  eee(10)|2016-09-29 08:00:00.0|2016-09-29 09:00:00.0|
  fff(464)|2016-09-29 09:00:00.0|2016-09-29 10:00:00.0|
  dddd(874)|2016-09-29 10:00:00.0|2016-09-29 11:00:00.0|
  ggggg(6)|2016-09-29 11:00:00.0|2016-09-29 12:00:00.0|
  kkkk(272)|2016-09-29 12:00:00.0|2016-09-29 12:30:00.0|
  </code></pre>