Dynamic Distribution Group including shared mailboxes

Joe Grover 526 Reputation points
2024-09-27T15:57:40.6733333+00:00

I just created a new dynamic distribution group for one of our regions, and it seems to be including shared mailboxes.

New-DynamicDistributionGroup -Name "DYN-ParisRegion" -RecipientFilter "(Office -eq 'Paris') -and (Company -eq 'Contoso') -and (RecipientType -eq 'UserMailbox')"

Is there something I'm missing here? Should it not match to shared mailboxes? I've confirmed in Exchange Online that the mailboxes are listed as SharedMailbox.

Microsoft Exchange Online
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 106.2K Reputation points MVP
    2024-09-27T16:00:33.0933333+00:00

    Your last clause is causing the inclusion of shared mailboxes. RecipientType is different from RecipientTypeDetails, and both user and shared mailboxes have the same value from the former. You can however use the latter to single out User mailboxes:

    New-DynamicDistributionGroup -Name "DYN-ParisRegion" -RecipientFilter "(Office -eq 'Paris') -and (Company -eq 'Contoso') -and (RecipientTypeDetails -eq 'UserMailbox')"
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.