Remove Shared Mailboxes From Dynamic Distribution Group

I have Exchange 365, and I created a dynamic distribution group that includes all employees.  This works fine, but the group appears to include "Shared" mailboxes.  Is there a way to remove these addresses from the group without specifying each individual mailbox?  Thanks for reading.
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.

You'd have to create a filter for your disto group that specifies only user boxes, else you're going to have to manually hide those mailboxes from your list.
thedeal56Author Commented:
Thanks for your quick reply!  This is how I initially configured the group:
group settings
I can add additional filters, but I'm not really sure how to make a filter that excludes the shared boxes.
Please refer this article from (Linda Wang MSFT Support ) to understand the available RecipientType or IncludedRecipients filter when you create a Dynamic Distribution Group.

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
thedeal56Author Commented:
Sorry for the delay.  Let me know if I'm understanding this correctly.  Let's say for each shared mailbox I input "shared" in the department field.  Then I add an attribute to the distribution group(making sure to include my existing attributes) that excludes any departments with the name "shared".  Will that work?
thedeal56Author Commented:
Here's what I ended up doing:  I added a value of "Exclude" as a custom attribute to the boxes that I didn't want to show up in the group, and then I ran this command:

Set-DynamicDistributionGroup "All Employees" -RecipientFilter {((RecipientType -eq 'UserMailbox') -and (CustomAttibute1 -ne 'Exclude'))}

Looks like it's all good now.  Thanks so much for your help with this.
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.