title: Need to convert txt file to CSV (with headers) using PowerShell
body: <p>Can we convert below txt file to CSV format added at the end?</p>
  
  <p>Text file:</p>
  
  <pre>
  IP Address: 192.168.1.1
  Hostname: 01-any1TEST 
  Event Message: Ping
  Alert Status: Down at least 3 min
  Event Time: 17:25:14
  Alert Type: :Windows 2012 Server
  -------------------------------------------------------------------------------------
  IP Address: 192.168.1.2
  Hostname: 02-any2TEST  
  Event Message: Ping
  Alert Status: Down at least 4 min
  Event Time: 17:25:40
  Alert Type: :Unix Server
  -------------------------------------------------------------------------------------
  IP Address: 192.168.1.3
  Hostname: 03-any3TEST 
  Event Message: Ping
  Alert Status: Down at least 3 min
  Event Time: 17:26:21
  Alert Type: :windows host 
  -------------------------------------------------------------------------------------
  </pre>
  
  <p>CSV file output required as below:</p>
  
  <pre>
  'IP Address','Hostname','Event Message','Alert Status','Event Time','Alert Type'
  '192.168.1.1','01-any1TEST','Ping','Down at least 3 min','17:26:21','Windows 2012 Server '
  '192.168.1.2','02-any2TEST','Ping','Down at least 3 min','17:26:21','unix host '
  '192.168.1.3','03-any3TEST','Ping','Down at least 3 min','17:26:21','windows host '
  </pre>