search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
How to get Exchange Server 2010 distribution groups and members via PowerShell
Posted in Exchange Server, Windows Powershell | No Comment | 1,831 views | 26/11/2014 11:01

I looked for a powershell command to get distribution groups and members in one command but it seems it’s not possible.

So I used an expression to merge them. You can check my following code:

1
Get-DistributionGroup | Select Name, @{label="Members";expression={($_ | Get-DistributionGroupMember).Name}}

Output will be like:

Name Members
—- ——-
Customer Services {Yusuf Ozturk, Bertan Demirci}

You can see all other fields by using:

1
Get-DistributionGroup | Select *, @{label="Members";expression={($_ | Get-DistributionGroupMember).Name}}

You can also add other field by using additional expressions.



Leave a Reply