Exchange 2007 - Dynamic Distribution group issue.
Hi, I am having some trouble with a Dynanic Distribution group that I am creating, it is not working the way I understand that it should. the command I have typed into the shell is as below: New-DynamicDistributionGroup '# Test' -OrganizationalUnit "mydomain.CO.UK/All Non-Comapny Contacts" -RecipientFilter {(RecipientType -eq 'MailContact') -and -not (Company -like 'Company1' -or Company -like 'Company2' -or Company -like 'Company3' -or Company -like 'Comapny4' -or Company -like 'Company5')} -RecipientContainer "mydomain.CO.UK/All Non-Company Contacts" Now the way I understand this, this will give me a group that included everything in and under the All Non-Company Contacts OU where the comany name is not Company 1..2 etc. However this is not how it is working? It is excluding the contacts that I am expecting it to exclude, however it is also including Contacts that are not in or under the OU All Non-Company Contacts, it is including all contacts in the domain that do not have a company name of the above. Now as I understand it, it should only be including contacts that are contained in and under the OU I have specified right??
March 2nd, 2011 9:39am

Now as I understand it, it should only be including contacts that are contained in and under the OU I have specified right?? Yes it is and actually you even don't have to define it in -RecipientContainer since it is the same location as in -OrganizationalUnit that dictates where to create the distribution group. "The RecipientContainer parameter filters the recipients that are used to build the dynamic distribution group based on their location in Active Directory. The value of RecipientContainer can be the canonical name of an organizational unit (OU) or a domain. If you do not specify a value for RecipientContainer, the default search filter is the location of the dynamic distribution group in Active Directory. This location is specified by using the OrganizationalUnit parameter."Jesper Bernle | Blog: http://xchangeserver.wordpress.com
Free Windows Admin Tool Kit Click here and download it now
March 2nd, 2011 9:53am

Now as I understand it, it should only be including contacts that are contained in and under the OU I have specified right?? Yes it is and actually you even don't have to define it in -RecipientContainer since it is the same location as in -OrganizationalUnit that dictates where to create the distribution group. "The RecipientContainer parameter filters the recipients that are used to build the dynamic distribution group based on their location in Active Directory. The value of RecipientContainer can be the canonical name of an organizational unit (OU) or a domain. If you do not specify a value for RecipientContainer, the default search filter is the location of the dynamic distribution group in Active Directory. This location is specified by using the OrganizationalUnit parameter." Jesper Bernle | Blog: http://xchangeserver.wordpress.com so do you have any idea why this is trying to include everyone from the entire Directory?
March 2nd, 2011 11:01am

Try the same command removing the -recipientcontainer attribute as it takes from the parent OU of the DL itself.
Free Windows Admin Tool Kit Click here and download it now
March 3rd, 2011 3:54am

Try the same command removing the -recipientcontainer attribute as it takes from the parent OU of the DL itself. Hi, Thanks for the reply, unfortunately this has not resolved the problem either. It is still including everybody
March 3rd, 2011 4:10am

does anyone else have any ideas on this issue?? I am pulling my hair out with this one, Microsoft's documentation is about as much use as a chocolate fire guards!
Free Windows Admin Tool Kit Click here and download it now
March 4th, 2011 3:57am

New-DynamicDistributionGroup -Name "# Test" -OrganizationalUnit "mydomain.CO.UK/OUforDistributionGroups" -RecipientContainer "mydomain.CO.UK/All Non-Company Contacts" -RecipientFilter {((RecipientType -eq 'MailContact') -and (-not (Company -like 'Company1')) -and (-not (Company -like 'Company2')) -and (-not (Company -like 'Company3')) -and (-not (Company -like 'Comapny4')) -and (-not (Company -like 'Company5')))} Try it to see if this formula works better ..Jesper Bernle | Blog: http://xchangeserver.wordpress.com
March 4th, 2011 6:38am

Hi jcnewman83, Any updates?Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
March 6th, 2011 10:21pm

Hi jcnewman83, Any updates? Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Hi, yes, I have tried the command suggested by Jesper Bernie and this is not working correctly either?? I am still getting contact entries included from the entire domain??
March 7th, 2011 7:03am

New-DynamicDistributionGroup -Name "# Test" -OrganizationalUnit "mydomain.CO.UK/OUforDistributionGroups" -RecipientContainer "mydomain.CO.UK/All Non-Company Contacts" -RecipientFilter {((RecipientType -eq 'MailContact') -and (-not (Company -like 'Company1')) -and (-not (Company -like 'Company2')) -and (-not (Company -like 'Company3')) -and (-not (Company -like 'Comapny4')) -and (-not (Company -like 'Company5')))} Try it to see if this formula works better .. Jesper Bernle | Blog: http://xchangeserver.wordpress.com Hi Jesper, Unfortunately this is not working either??
Free Windows Admin Tool Kit Click here and download it now
March 9th, 2011 5:17am

Could you try creating a simple DDG to see if it also "ignores" the -recipientContainer as well. I find it wierd that the command above works perfectly for me but not for you. It feels like this should be an All or Nothing situation, right? Give it a try and post back.Jesper Bernle | Blog: http://xchangeserver.wordpress.com
March 9th, 2011 2:25pm

Could you try creating a simple DDG to see if it also "ignores" the -recipientContainer as well. I find it wierd that the command above works perfectly for me but not for you. It feels like this should be an All or Nothing situation, right? Give it a try and post back. Jesper Bernle | Blog: http://xchangeserver.wordpress.com Hi, Sorry for the slow reply, I have been off ill for a while and just back in the office. I have tried adding just a plain vanilla dynamic distribution group in the desired OU and it works as expected??
Free Windows Admin Tool Kit Click here and download it now
March 22nd, 2011 5:52am

Okay. Interesting. Can you break your working DDG by chaning the Recipient Filter to -RecipientFilter {((RecipientType -eq 'MailContact') -and (-not (Company -like 'Company1')) -and (-not (Company -like 'Company2')) -and (-not (Company -like 'Company3')) -and (-not (Company -like 'Comapny4')) -and (-not (Company -like 'Company5')))}Jesper Bernle | Blog: http://xchangeserver.wordpress.com
March 22nd, 2011 9:18am

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

Other recent topics Other recent topics