title: Powershell take list of servers, and add "server" property
body: <p>I'm looking to combine data from two sources in an existing script. </p>
  
  <p>I have one list of servers which is pulled via a Citrix command called <code>Get-XAServer</code>. Using this cmdlet, an array is created, with two properties, <code>server</code> and <code>logonmode</code>. Running <code>$1stList</code> looks like this:</p>
  
  <pre><code>SERVER  LOGONMODE
  Server1 AllowLogOns
  Server2 AllowLogOns
  </code></pre>
  
  <p>Now, I want to update this list of servers that can't be pulled via the <code>get-XAserver</code> cmdlet. So, inside the script, I've just got an array variable that's like this, but from a list of servers that's in the following format:</p>
  
  <pre><code>$2ndList = "Server3", "Server4", "Server5"
  </code></pre>
  
  <p>Problem is, the <code>server</code> property isn't attached to the 2nd list. So, when i try to combine the arrays, they aren't parsed properly.</p>
  
  <p>How do I iterate through the 2nd list so that the <code>server</code> and <code>logonmode</code> properties are both added to each/every server in the <code>$2ndList</code> array?</p>