How to verify if the user receives the message, sent to Dynamic Distribution group in Exchange 2007

In most of Exchange organizations the usage of Dynamic Distribution groups is wide and crucial. For example, mass mailings from executives, global announcements and many other needs.

Mostly while creating the Dynamic Distribution group, you can click on “Preview” and see the results. But the problem is that the results are limited to 1000 recipients. As well, the preview results window is not sortable and not searchable.

Therefore, the following PowerShell script will explain how to be sure, that certain recipient will be included in the distribution to the Dynamic group.

First step, we have to bind to the group:

$AdminSessionADSettings.ViewEntireForest = $true
$group = Get-DynamicDistributionGroup -identity "AllRecipients"

usage of "ViewEntireForest"set to "$true" is highly recommended, in case the organization has a multiply domain infrastructure

Second, we will resolve all the “virtual” members of the Dynamic Distribution group

$members = Get-Recipient -RecipientPreviewFilter $group.RecipientFilter -ResultSize:unlimited

Please pay attention to "-ResultSize:unlimited" at the end of the command, it is very important to resolve all recipients and not to stop after the first 1000 entries

Next step is to resolve the exact recipient object. Note: you can use exact email address or alias for the search as well, i.e: “”:

$recipient = Get-Recipient "John Doe"

Finally, we can check, if the recipient is a “member” of the Dynamic Distribution group:

$members | Where-Object {$_.Identity -eq $recipient.Identity}

The result will look like this (in case the recipient was found):

Name RecipientType
—- ————-
John Doe UserMailbox

For your convenience, the full script goes below. Just replace the names to reflect your needs and you will see the desired:

$AdminSessionADSettings.ViewEntireForest = $true
$group = Get-DynamicDistributionGroup -identity "AllRecipients"
$members  = Get-Recipient -RecipientPreviewFilter $group.RecipientFilter -ResultSize:unlimited
$recipient = Get-Recipient "John Doe"
$members | Where-Object {$_.Identity -eq $recipient.Identity}

Enjoy! Any comments will be very appreciated!