Error Modifying Dynamic Distribution Lists

I have a dynamic distribution list was created with Exchange 2007. We are now on Exchange 2013 and I am trying to modify the DL the same as I did with Exchange 2007. To add users that did not meet the Office criteria I would simply put an "-or" in the set command and addthe user based on the displayname. This always worked. Now I am getting the following error "Cannot bind parameter 'RecipientFilter' to the target. Exception setting "RecipientFilter": "Invalid filter syntax. What should I do differently.

Set-DynamicDistributionGroup -Identity 'Southern California' -RecipientFilter {(Office -eq 'Southern California'  -or DisplayName -eq 'User, Mailbox1'-or DisplayName -eq 'User, Mailbox2' -or DisplayName -eq 'User, Mailbox3' -or DisplayName -eq 'User, Mailbox4' -or DisplayName -eq 'User, Mailbox5' -or DisplayName -eq 'User, Mailbox6' -or DisplayName -eq User, Mailbox7 -or DisplayName -eq User, Mailbox8' -or DisplayName -eq User, Mailbox9)}

August 11th, 2015 4:52pm

Nothing fancy, I just tried this and worked...

Set-DynamicDistributionGroup -Identity 'Southern California' -RecipientFilter {(Office -eq 'Southern California' -or DisplayName -eq 'User, Mailbox1'-or DisplayName -eq 'User, Mailbox2' -or DisplayName -eq 'User, Mailbox3' -or DisplayName -eq 'User, Mailbox4' -or DisplayName -eq 'User, Mailbox5' -or DisplayName -eq 'User, Mailbox6' -or DisplayName -eq 'User, Mailbox7' -or DisplayName -eq 'User, Mailbox8' -or DisplayName -eq 'User, Mailbox9')}

Just changed the  to ' in your original cmdlet...

Free Windows Admin Tool Kit Click here and download it now
August 11th, 2015 7:20pm

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

Other recent topics Other recent topics