Dynamic Distribution Group LDAP query issue

Thanks to any and all in advance for your help.

So I'm trying to configure a dynamic distribution group query to accomplish two things:

1.  Grab all mailboxes with secondary email addresses of say @domain1.com and @domain2.com

2.  Exclude Distribution groups in the query (as some of the distribution groups have secondary addreses as above)

I'm running the following powershell to set the recipient filter on the DDL:

Set-DynamicDistributionGroup "DistributionGroup" -RecipientFilter {((EmailAddresses -like "*@domain1.com") -and (EmailAddresses -like "*@domain2.com")-and (-not(RecipientType -eq "MailUniversalDistributionGroup")))}

After checking the members of the dynamic list, I'm still seeing regular distribution groups be included when the Dynamic Distribution List is populated.

Banging my head on my desk.  What am I missing?

Thanks again!

Statik

April 21st, 2015 11:32am

Welp, figured it out, didn't have my filters in the correct order.

Set-DynamicDistributionGroup "DistributionGroup" -RecipientFilter {((EmailAddresses -like "*@domain1.com") -or (EmailAddresses -like "*@domain2.com")) -and (RecipientType -eq 'UserMailbox')}

For anyone else trying to do this, the above works like a charm.

Statik

  • Marked as answer by DJStatik 15 hours 10 minutes ago
Free Windows Admin Tool Kit Click here and download it now
April 21st, 2015 12:17pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics