title: Export Distribution Groups, Members and Email Addresses
body: <p>I'm trying to get this command to list all distribution groups to include all email addresses (not just primary) and this works, although I'd like it comma delimited instead of space delimited if possible. </p>
  
  <p>The only thing that's missing are the Members which I'd also like to include the in the results. Can someone tell me how to do that?</p>
  
  <pre><code>Get-DistributionGroup -Resultsize unlimited | Select Name,PrimarySmtpAddress,
    @{L="EmailAddresses";E={$_.EmailAddresses | ? {$_.PrefixString -ceq "smtp"} | % {$_.SmtpAddress}}} | 
      Export-Csv c:\Results.csv -NoTypeInformation
  </code></pre>
  
  <p>Essentially I should have the required values for all these columns:</p>
  
  <pre><code>DG Name, Primary SMTP Address, Email Addresses (comma delimited), Members (comma delimited)
  </code></pre>
  
  <p>If not too difficult, it'd be nice to display all the comma-delimited results in one cell for each DG (or some way that's easy to read).</p>