Forum Discussion

WaldoKing's avatar
WaldoKing
Copper Contributor
Jun 22, 2023

Dynamic Distibution group

Hi Everyone    I have been struggling with this query for a year. While I feel it should be so simple.    Need a dynamic all staff group. Using the 'all exchange mailboxes' option; includes shar...
  • VasilMichev's avatar
    Jun 23, 2023
    RecipientType of "UserMailbox" does include shared, room and so on mailboxes. RecipientTypeDetails is what you need to use instead. Here's a comparisson:

    [09:13:42][O365]# Get-Recipient -RecipientType UserMailbox | group RecipientTypeDetails -NoElement

    Count Name
    ----- ----
    16 SharedMailbox
    16 UserMailbox
    1 TeamMailbox
    4 RoomMailbox
    5 SchedulingMailbox
    2 DiscoveryMailbox
    1 EquipmentMailbox


    [09:14:00][O365]# Get-Recipient -RecipientTypeDetails UserMailbox | group RecipientTypeDetails -NoElement

    Count Name
    ----- ----
    16 UserMailbox

Share

Resources