title: How to save each line of text file as array through powershell
body: <p>If I have a text file, C:\USER\Documents\Collections\collection.txt that has the following information:</p>
  
  <pre><code>collectionA.json
  collectionB.json
  collectionC.json
  collectionD.json
  </code></pre>
  
  <p>I am wondering how, through Powershell, I am able to store each line in the text file as elements of an array such as..</p>
  
  <pre><code>array arrayFromFile = new Array;
  foreach(line x in collection.txt)
  {
      arrayFromFile.Add(x);
  }
  </code></pre>
  
  <p>..with the end goal of doing the following:</p>
  
  <pre><code>foreach(string x in arrayFromFile)
  {
      newman run x;
  }
  </code></pre>
  
  <p>My apologies for the seemingly easy question - I have never dealt with Powershell before.</p>