Get The Members Of An Exchange 2007 Distribution Group…

Many a times we are faced with the task of getting all the members in a distribution group, especially in a large group. It is very easy with Powershell. Run the following command, Get-DistributionGroupMember –identity “group name” In order to select the properties we need, pipe the command to format-table with the necessary values. Get-DistributionGroupMember…

Many a times we are faced with the task of getting all the members in a distribution group, especially in a large group. It is very easy with Powershell. Run the following command,

Get-DistributionGroupMember –identity “group name”

In order to select the properties we need, pipe the command to format-table with the necessary values.

Get-DistributionGroupMember –identity “group name” | ft name, primarysmtpaddress

1

As usual, we can export the output to a txt or csv file.

Get-DistributionGroupMember –identity “group name” | ft name, primarysmtpaddress | Export-CSV c:members.csv

11 Comments

  1. luis mendez says:

    this works very fine thanks

    1. Rajith Enchiparambil says:

      Glad it helped Luis.

  2. Rajith Jose Enchiparambil says:

    Thanks

  3. can i get output as count of members for each distribution group of my exchange 2007 from one command

  4. Rajith Jose Enchiparambil says:

    Thanks for the explained post Anonymous.

  5. Anonymous says:

    For the problem Selvian posted, in detail (i.e.) I downloaded ActiveRoles Management Shell for Active Directory 32-bit in my windows xp from http://www.quest.com/powershell/activeroles-server.aspx
    and then from Desktop ProgramsQuestSoftwareActiveR… lauch the shell. Otherwise you can use it from PowerGUI (getting it from FilesPowershell libraries)

    Leo

  6. Rajith Jose Enchiparambil says:

    Easiest will be to install PowerGUI, a free GUI to manage AD, Exchange, VMWare etc and run Get-QADGroupMember "group name" -Indirect from the script editor or load the quest snapin in powershell and run it from there.

    http://www.powergui.org

  7. Hey !

    I have a distribution list which contains other distribution groups. Is there any way to list all the members who is member of the main group?

    example:
    Got a group called A, and this group is has members B and C. B and C contains users.
    I need to get a list of alle the members who indirectly is member of the main group A.

    Thanks.

  8. Rajith Jose Enchiparambil says:

    Thanks Liam.

  9. Anonymous says:

    Very helpful ,Thanks Liam

Leave a Reply

Your email address will not be published. Required fields are marked *