Export Distribution Groups, Members and Email Addresses
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. 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? Get-DistributionGroup -Resultsize unlimited | Select Name,PrimarySmtpAddress, @{L="EmailAddresses";E={$_.EmailAddresses | ? {$_.PrefixString -ceq "smtp"} | % {$_.SmtpAddress}}} | Export-Csv c:\Results.csv -NoTypeInformation Essentially I should have the require
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.