Dynamic Distribution Group Filters in Exchange 2007

I’ve been working on created an Exchange 2007 Dynamic Distribution Group (DDG). I struggled with the syntax for some time, but finally found the answer.

My goal was to create a DDG that included all users in one building, but filtered out all resource mailboxes.

My problem was that I originally tried to add the -not IsResource to the end of the statement.
I finally found the syntax on a blog that I couldn’t read, but the syntax was in English.


Here is the syntax I used:

New-DynamicDistributionGroup -Name “ListName” -OrganizationalUnit “domain.local/Exchange Objects/Distribution Groups” -RecipientFilter {-not(IsResource -eq $true) -and (RecipientType -eq ‘UserMailbox’ -and office -like ‘A*’ -or office -like ‘B*’ -or office -like ‘C*’)}

New-DynamicDistributionGroup (Creates new DDG)
-Name “ListName” (Sets the name of the list
-OrganizationalUnit “domain.local/Exchange Objects/Distribution Groups” (Specifies the OU in which to create the list.)
-RecipientFilter (Filters Recipients)
{-not(IsResource -eq $true) ( filters out resource mailboxes)
-and (RecipientType -eq ‘UserMailbox’ (filters UserMailboxes
-and office -like ‘A*’ -or office -like ‘B*’ -or office -like ‘C*’ (Filters in users that are in wing A,B,C)


Comments are closed.