How to view the members of addresslist created by Exchange Management Shell

The exchange management console supports you to view the members or resources of an addresslist. However, you can get only members/resources of addresslists created by the exchange  management console. In order to view members/resources of addresslists created by the exchange management shell you have to use the exchange management shell commands. You will have to run two consecutive commands in order to obtain the members of the addresslist.

First you have to run the get-addresslist command to get the full path of the address list.

Get-AddressList -Identity "addresslist name" | fl DistinguishedName

For example, Get-AddressList -Identity "mylist" | fl DistinguishedName will return something like that CN=mylist,CN=All Address Lists,CN=Address Lists Container,CN=EDUProducts Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=eduproducts,DC=dev

Second you will use the returned string to run the following command:

Get-Recipient -Filter {AddressListMembership -eq ‘CN=mylist,CN=All Address Lists,CN=Address Lists Container,CN=EDUProducts Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=eduproducts,DC=dev’¬†

Note: only users that have mailboxes created will appear. Users with no mail boxes will not be returned.

For further information about exchange shell commands:

http://technet.microsoft.com/en-us/library/bb430757(EXCHG.80).aspx

Advertisements