List Members of a Dynamic Distribution List
This post was inspired by a post found on www.howexchangeworks.com
But I have modified the commands some to get a better listing.
$group = Get-DynamicDistributionGroup –identity “AllStaff”
Get-Recipient –RecipientPreviewFilter $group.RecipientFilter | sort name | select name > d:\_temp\dlist_members.txt
These changes will give you an alphabetical list of members, with names only in the list. I find this easier for managers to use to verify list membership.
The list we have uses the PO filed to filter it. So we then just have to go to the user account and add specific text in the PO filed to add or remove them from the distribution list.
This would not work for me using both Exchange 2007 and 2010 Powershell commandlets. I had to replace -RecipientPreviewFilter with -LdapRecipientPreviewFilter for it to work. Just an FYI,
Worked perfectly – Exchange 2010 sp1