Exchange Geek's Weblog

I'm a Geek!

Find All Distribution Groups and their Members in Exchange Org

Posted by Milind Naphade on 25/02/2011

Get-DistributionGroup –ResultSize Unlimited | FL Identity | Out-File C:\Temp\All_DGs.txt

$AllDGs = Get-Content "D:\Temp\All_DGs.txt"
ForEach ($DG in $AllDGs)
{
Echo $DG >>"D:\Temp\All_DG.csv"
Get-DistributionGroupMember –Identity $DG -ResultSize Unlimited | FT Name, PrimarySMTPAddress, RecipientType >> "D:\Temp\All_DG.csv"
}

 

I know this simple script can be even better but it was written in extreme hurry so it does have some extra lines. If you feel that it could be really better then please feel free to comment with your own idea. 🙂

Advertisements

3 Responses to “Find All Distribution Groups and their Members in Exchange Org”

  1. Hey Milind,

    One of my subscriber was looking for this. Let me send him the link. Thanks and a good one !!

    Ratish

  2. Hey Ratish! Glad to hear it is going to help at least one person.

  3. […] Tenha certeza que pode ser bastante útil. Veja aqui: http://msexchangegeek.com/2011/02/25/find-all-distribution-groups-and-their-members-in-exchange-org/ […]

Sorry, the comment form is closed at this time.

 
%d bloggers like this: