title: How to store output of an array in a file?
body: <p>I have a small powershell script which collects metrics from servers remotely.
  In general functions are called to gather the CPU / Memory / HDD info.</p>
  
  <p>I pick up the servers from a text file and foreach machine the functions are getting called.</p>
  
  <pre><code>foreach ($i in Get-Content "C:\Servers.txt")
  {{"=========================="; $i + "`n" + "==========================";
   "Number of CPU Cores" ; CPU-Info ; "Memory in GB" ; Memory-Info
    ; "HDDs in GB" ; HDD-Size } 
  </code></pre>
  
  <p>First I tried to outfile everything using <code>out-file</code> but of course every new input overwrote my file.
  Is there are way to temporary store the output and out-file it in a good way?</p>
  
  <p>What would you recommend? Maybe there is a much smoother way of doing it?</p>