DDL custom query - Syntax Question
Sorry for the double-post - I saw my mistake ("-eq" requirement), but I still want to verify the syntax. I want to create a DDL that includes both usermailboxes and contact objects which possess the same data except in different attributes. Does this look like the proper syntax and would it work on both 2007 and 2010? Thanks very much. New-DynamicDistributionGroup -Name "RTP Test Group" -IncludedRecipients Mailboxusers, Mailcontacts -RecipientFilter { ((l -eq 'RTP')(employeetype -eq 'employee')),((extensionattribute13 -eq 'RTP')(extensionattribute14 -eq 'employee')) } -OrganizationalUnit "mycorp.mycompany.COM/Exchange Distribution Lists" -RecipientContainer "mycorp.mycompany.COM"
February 8th, 2011 4:27pm

On Tue, 8 Feb 2011 21:21:37 +0000, Rich Chalifoux wrote: > > >Sorry for the double-post - I saw my mistake ("-eq" requirement), but I still want to verify the syntax. I want to create a DDL that includes both usermailboxes and contact objects which possess the same data except in different attributes. Does this look like the proper syntax and would it work on both 2007 and 2010? Thanks very much. > >New-DynamicDistributionGroup -Name "RTP Test Group" -IncludedRecipients Mailboxusers, Mailcontacts -RecipientFilter { ((l -eq 'RTP')(employeetype -eq 'employee')),((extensionattribute13 -eq 'RTP')(extensionattribute14 -eq 'employee')) } -OrganizationalUnit "mycorp.mycompany.COM/Exchange Distribution Lists" -RecipientContainer "mycorp.mycompany.COM" What's up with the comma in the middle of the filter and no "-and" operators? Does this look better? -RecipientFilter { ((l -eq 'RTP') -and (employeetype -eq 'employee')) -or ((extensionattribute13 -eq 'RTP') -and (extensionattribute14 -eq 'employee')) } --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
February 8th, 2011 9:39pm

Thanks for responding. I had assumed the (,) was an OR flag based on an example where I saw -IncludedRecipients 'MailboxUser, MailContact' indicating more than one recipient type but not all recipient types. Bad assumption on my part. Question regarding your filter, if I wanted to include only MailboxUsers and MailContacts and no other recipient types what params would be most suitable? I am not sure if -IncludedRecipients even belongs here now. Need to read more about Exch P-Shell. I also noticed that "employeeType" was not a searchable RecipientFilter parameter. Does that mean I can't create DDL's based on this or other attributes that are not RecipientFilter friendly? Is there any way to include this attribute?
February 9th, 2011 9:13pm

On Thu, 10 Feb 2011 02:11:37 +0000, Rich Chalifoux wrote: >Thanks for responding. I had assumed the (,) was an OR flag based on an example where I saw -IncludedRecipients 'MailboxUser, MailContact' indicating more than one recipient type but not all recipient types. The comma is a list item separator. >Bad assumption on my part. Question regarding your filter, if I wanted to include only MailboxUsers and MailContacts and no other recipient types what params would be most suitable? I am not sure if -IncludedRecipients even belongs here now. Need to read more about Exch P-Shell. I also noticed that "employeeType" was not a searchable RecipientFilter parameter. Does that mean I can't create DDL's based on this or other attributes that are not RecipientFilter friendly? See these URLs: http://technet.microsoft.com/en-us/library/bb738157(EXCHG.80).aspx http://technet.microsoft.com/en-us/library/bb738155(EXCHG.80).aspx >Is there any way to include this attribute? No, there isn't. You could duplicate the value in a custom attribute, though. --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
Free Windows Admin Tool Kit Click here and download it now
February 9th, 2011 10:17pm

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

Other recent topics Other recent topics