title: Combining variables in a table
body: <p>I am trying to combine two variables each containing a list of values:    </p>
  
  <pre><code>cls
      $Sites = Get-ADReplicationSite -Filter *
      $Subnets = Get-ADReplicationSubnet -Filter * 
  
      $a = New-Object PSObject
        $a | add-member Noteproperty "Site" $Sites.Name
        $a | add-member Noteproperty "Subnet" $Subnets.Name
      $a | format-table
  </code></pre>
  
  <p>My output looks like this:</p>
  
  <pre><code>Site                                     Subnet                                 
  ----                                     ------                                 
  {Default-First-Site-Name, SITE1, SI... {10.0.0.0/24, 20.0.0.0/24, 30.0.0.0/...
  </code></pre>
  
  <p>As the above does not result in a clear table I wonder where I went wrong. Preferably I would combine these two variables into a .csv file. However I am not sure on how I would give each list a Header before piping it to the <code>Export-CSV</code> cmdlet. </p>