title: Appending data from one variable onto another in powershell
body: <p>I've got two variables that have two separate list with exactly the same amount of lines:</p>
  
  <pre><code>$server = $agentserver.name 
  $type = $agentserver.agentservertype
  </code></pre>
  
  <p>Example data output</p>
  
  <pre><code>$server    $type
  server1    windows
  server2    ndmp
  </code></pre>
  
  <p>I want to append the data from $type onto $server with a ","
  so the output would look like this:</p>
  
  <pre><code>server1,windows
  server2,ndmp
  </code></pre>
  
  <p>I have been trying to use foreach loops and increment one onto the other but I can't get it to work properly this is my code I am using:</p>
  
  <pre><code>$agentserver = foreach($i in $server){foreach($j in $type){$i + ($j++)}}
  </code></pre>
  
  <p>How can I get this to append properly in powershell?</p>