Share via

Dynamic Distribution Group including shared mailboxes

Joe Grover 641 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.

Exchange Online
Exchange Online

A cloud-based service included in Microsoft 365, delivering scalable messaging and collaboration features with simplified management and automatic updates.

0 comments No comments
{count} votes

Answer accepted by question author
  1. Vasil Michev 125.2K Reputation points MVP Volunteer Moderator
    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' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.