title: How do I combine these 3 powershell commands into a single line?
body: <p>I need to select three pieces of data from an email contact, and place them into columns, (export-csv style columns).</p>
  
  <p>I'm unsure how to "split" the output from the following commands.</p>
  
  <p><strong>Get the primary SMTP address</strong></p>
  
  <pre><code>ForEach ($address in Get-Mailbox -ResultSize Unlimited | Select EmailAddresses) {$address.EmailAddresses | Where {$_.Prefix -match"smtp" -and $_.IsPrimaryAddress -eq $true} | Select AddressString }
  </code></pre>
  
  <p><strong>Get all smtpAddresses</strong> (hopefully omit the primary)</p>
  
  <pre><code>ForEach ($address in Get-Mailbox -ResultSize Unlimited | Select EmailAddresses) {$address.EmailAddresses | Where {$_.Prefix -match "SMTP" } | Select AddressString }
  </code></pre>
  
  <p><strong>Get the X500 address</strong></p>
  
  <pre><code>ForEach ($address in Get-Mailbox -ResultSize Unlimited | Select EmailAddresses) {$address.EmailAddresses | Where {$_.Prefix -match "x400" } | Select AddressString }
  </code></pre>
  
  <p>How do I join them into a single column?</p>