title: Parsing Text file and placing contents into an Array Powershell
body: <p>I am looking for a way to parse a text file and place the results into an array in powershell.</p>
  
  <p>I know select-string -path -pattern will get all strings that match a pattern.  But what if I already have a structured textfile, perhaps pipe delimminated, with new entries on each line.  Like so:</p>
  
  <p>prodServ1a
  prodServ1b
  prodServ1c</p>
  
  <p>C:\dir\serverFile.txt</p>
  
  <p>How can I place each of those servers into an array in powershell that I can loop through?</p>