title: Powershell array of arrays loop process
body: <p>I need help with loop processing an array of arrays.  I have finally figured out how to do it, and I am doing it as such...</p>
  
  <pre><code>$serverList = $1Servers,$2Servers,$3Servers,$4Servers,$5Servers
  
  $serverList | % {
      % {
          Write-Host $_
          }
      }
  </code></pre>
  
  <p>I can't get it to process correctly.  What I'd like to do is create a CSV from each array, and title the lists accordingly.  So 1Servers.csv, 2Servers.csv, etc...  The thing I can not figure out is how to get the original array name into the filename.  Is there a variable that holds the list object name that can be accessed within the loop?  Do I need to just do a separate single loop for each list?</p>