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

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.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Addy NadiaExpertCommented:

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

jburnerducksAuthor Commented:
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.
Addy NadiaExpertCommented:

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.'))}


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
jburnerducksAuthor Commented:
Thanks Andy, that worked!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.