What's Wrong With My Query Based Distribution Group query definition?
Good Morning! I hope this is the best forum for creating Query Based Distribution Groups on Exchange 2007. If it is not please let me know. I'm running into an odd error where some of the Queries I'm using will return correct results on the Preview of the Recipients Filter in the Exchange Management Console--but when an email is sent out using that query, no email is sent. This is only a problem on SOME of our QB DGs, others work just fine it seems. An example of a query that works: ((RecipientType -eq 'UserMailbox' -and Department -like '*University Networking Systems and Services*') -and -not(Name -like 'SystemMailbox{*') -and -not(Name -like 'CAS_{*')) An example of two different queries that don't work: (((RecipientType -eq 'UserMailbox' -and -not(Description -like '*Student*')) -and (Department -like '*Education and Human Sciences Student Services*' -or Notes -like '*Education and Human Sciences Student Services*')) -and -not(Name -like 'SystemMailbox{*') -and -not(Name -like 'CAS_{*')) (((RecipientType -eq 'UserMailbox' -and -not(Description -like '*Student*')) -and (Department -like '*Instructional Design Services*' -or Notes -like '*Instructional Design Services*')) -and -not(Name -like 'SystemMailbox{*') -and -not(Name -like 'CAS_{*')) As you can see, the different is that we're trying to filter out any recipients that have Student in their title (This so departments can mailed their full time workers, and not Student employees.) The query works with the preview, but not when actually sending. Could you tell me why it doesn't work, or suggest a variation of the script that would accomplish the same? Am I writing the script wrong? UPDATE: I realized the queries I posted are what you seen in the Console, but I actually created them in the shell, so here's an example of how I'm inputting the query in the shell: New-DynamicDistributionGroup -Name "SDSU Instructional Design Services" -RecipientFilter {(RecipientType -eq 'UserMailbox') -and (description -notlike '*Student*') -and (Department -like '*Instructional Design Services*' -or Notes -like '*Instructional Design Services*')} Thank you for your time.
October 8th, 2010 11:00am

New-DynamicDistributionGroup -Name "SDSU Instructional Design Services" -RecipientFilter {(RecipientType -eq 'UserMailbox') -and (description -notlike '*Student*') -and (Department -like '*Instructional Design Services*' -or Notes -like '*Instructional Design Services*')} Thank you for your time. Don't have a test lab to verify, but I didn't see decription as a -filter parameter here: http://technet.microsoft.com/en-us/library/bb738155(EXCHG.80).aspx If you create a simpler QBDL can you verify if it is (or if in removing it from the QBDL the results correspond to what was anticipated)?
Free Windows Admin Tool Kit Click here and download it now
October 8th, 2010 4:51pm

On Fri, 8 Oct 2010 14:58:15 +0000, AndyGK1234 wrote: [ snip ] >Could you tell me why it doesn't work, or suggest a variation of the script that would accomplish the same? Am I writing the script wrong? > >UPDATE: > >I realized the queries I posted are what you seen in the Console, but I actually created them in the shell, so here's an example of how I'm inputting the query in the shell: > >New-DynamicDistributionGroup -Name "SDSU Instructional Design Services" -RecipientFilter {(RecipientType -eq 'UserMailbox') -and (description -notlike '*Student*') -and (Department -like '*Instructional Design Services*' -or Notes -like '*Instructional Design Services*')} Is that the complete set of parameters? Perhaps the base for the search is incorrect? Try using an appropriate value for the "-RecipientContainer" (even if it's the root of the entire AD Forest) and see if that cures the problem. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
October 8th, 2010 8:12pm

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

Other recent topics Other recent topics