Link to home
Start Free TrialLog in
Avatar of fernie54
fernie54Flag for United States of America

asked on

How do I exclude hidden mailboxes from a Dynamic Distribution Group?

I can create new dynamic distribution groups using powershell and the Exchange Console, but I cannot figure out how to filter the hidden mailboxes so they are not added.  Does anyone have any experience with this?  The script I am using is below:

New-DynamicDistributionGroup -Name "test5" -OrganizationalUnit 'mydomain/Distribution Groups' -RecipientContainer mydomain -RecipientFilter { recipienttype -eq 'usermailbox' -and Company -eq 'company name.' -and CustomAttribute2 -eq 'domain.com' }
ASKER CERTIFIED SOLUTION
Avatar of Akhater
Akhater
Flag of Lebanon image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fernie54

ASKER

Looks like that did it.  I think I was trying to make it too complicated.  Thank you.
You are welcome !

I never did it before and glad to know it worked something to add to my knowledge base for sure