Link to home
Start Free TrialLog in
Avatar of hoaglalj1
hoaglalj1

asked on

Resource mailboxes incorrectly being included in Dynamic Distribution Group

I have a DDG that I don't want to include Resource mailboxes. Properties, Filter tab has "The following specific types" button selected, and "Resource mailboxes" unchecked.

If I run get-recipient for the DDG, it lists all the resources (conf rooms, equipment, etc.), as well as the users I want in the DDG. Get-recipient displays RecipientType as UserMailbox, even though EMC shows them as Resources. I assume that is why the Resource mailboxes are included?

How do I change the resources to not be UserMailboxes? I would prefer not to make a filter using set-dynamicdistributiongroup.
Avatar of Ciprian Lozonschi
Ciprian Lozonschi
Flag of Czechia image

Only with Set-DynamicDistributionGroup you will manage to do it. You need to filter deep.
All mailbox recipients have RecipientType = UserMailbox, but look at RecipientTypeDetails property, specially at RoomMailbox, EquipmentMailbox
Avatar of hoaglalj1
hoaglalj1

ASKER

Are you saying I should create a filter RecipientTypepDetails ne 'RoomMailbox' or EquipmentMailbox'?
Yes, you should exclude those 2 categories. I know I did it in the past such thing, but I don't have with me right now the scripts.
ASKER CERTIFIED SOLUTION
Avatar of hoaglalj1
hoaglalj1

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
Administrative Comment:
This question does not need additional help - it needs to be closed with points awarded.
The filter is working correctly for Resources and Rooms, by using the RecipientTypeDetailsValue parameter.

Set-DynamicDistributionGroup all-users -RecipientFilter {((((RecipientType -eq 'UserMailbox') -or (RecipientType -eq 'MailUser'))) -and (-not(Name -like 'SystemMailbox{*')) -and (-not(Name -like 'CAS_{*')) -and (-not(RecipientTypeDetailsValue -eq 'MailboxPlan')) -and (-not(RecipientTypeDetailsValue -eq 'DiscoveryMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'ArbitrationMailbox')) -and (-not(RecipientTypeDetailsvalue -eq 'RoomMailbox')) -and (-not(RecipientTypeDetailsValue -eq 'EquipmentMailbox')))}
hoaglalj1 - Be a good sport and award the points to the person who helped you get the question answered - namely "lciprianionut"

You can include your answer as part of the solution, you just don't get awarded any points.
The above Powershell line provided the correct filtering