?
Solved

How do you exclude a specific email address from a dynamic distribution group in exchange 2010?

Posted on 2014-08-22
5
Medium Priority
?
1,303 Views
Last Modified: 2014-08-23
Hello,
I'm trying to find the exact command to use in powershell to remove a user from a dynamic distribution list called "Everybody."  I found some examples on the web but I must be doing something wrong because it doesn't work. Can someone point me in the right direction? Thanks in advance.
0
Comment
Question by:jburnerducks
  • 3
  • 2
5 Comments
 
LVL 5

Expert Comment

by:Addy Nadia
ID: 40279025
Hi,


You can exclude a specific user from a DD group with the Set-DynamicDistributionGroup commandlet. Specifically with the -RecipientFilter option.

Example: Set-DynamicDistributionGroup -Identity MadeUpName -RecipientFilter {((RecipientType -eq 'UserMailbox') -and -not(Name -like 'Journal User'))}

Note that this example is just with recipient type = userMailbox. You can get the current recipientFilter of your DD group and modify it however from powershell.

(get-DynamicDistributionGroup -Identity MadeUpName).RecipientFilter


Thanks,
0
 
LVL 5

Expert Comment

by:Addy Nadia
ID: 40279028
0
 

Author Comment

by:jburnerducks
ID: 40279496
Thanks Andy,
What's the proper syntax if I wanted to add 3 users at a time? Would it be: Set-DynamicDistributionGroup -Identity MadeUpName -RecipientFilter {((RecipientType -eq 'UserMailbox') -and -not(Name -like 'Journal User1')) -and -not(Name -like 'Journal User2')) -and -not(Name -like 'Journal User3'))} ?
I ask that because I tried to add one name at a time, but each time I typed the command it overwrote the filter.
0
 
LVL 5

Accepted Solution

by:
Addy Nadia earned 2000 total points
ID: 40280236
Hi,

Yes you are correct, here is the Example

Set-DynamicDistributionGroup -Identity DDGName -RecipientFilter {((RecipientType -eq 'UserMailbox') -and -not(Name -like 'Display Name 1') -and -not(Name -like 'Display Name 2') -and -not(Name -like 'Display Name 3') -and -not(Name -like 'Display name etc.'))}

thanks,
Andy
0
 

Author Closing Comment

by:jburnerducks
ID: 40280847
Thanks Andy, that worked!
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to effectively resolve the number one email related issue received by helpdesks.
If you have come across a situation where you need to find some EDB mailbox recovery techniques, then here you will find the same. In this article, we will take you through three techniques using which you will be able to perform EDB recovery. You …
This video discusses moving either the default database or any database to a new volume.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question