No announcement yet.

Add Static Distribution Group to Dynamic 0365 Group (?)

  • Filter
  • Time
  • Show
Clear All
new posts

  • Add Static Distribution Group to Dynamic 0365 Group (?)

    I have been given the task of producing a distribution list that cannot be expanded if you click the + sign in Outlook. I can do this by creating a Dynamic Distribution List in 0365.

    Problem is, I have staff and contact emails I need to add to the dynamic list. The staff are not an issue, I can use CustomAttributes to filter on, but the contacts do not have this feature. I can put the contacts into a traditional 0365 distribution group and hide it from the address list, but can I add the static distribution list to the dynamic one via a filter?

    If so, what are the powershell cmds to filter on the static dist list and customattribs?


  • #2
    New-DynamicDistributionGroup -Name "GroupName" -RecipientFilter {(RecipientTypeDetails -eq 'UserMailbox') -and (CustomAttribute1 -eq 'GroupName')}

    Will give me the staff addresses. I just need to add a single static distribution group to this filter to bring in the contacts.



    • #3
      In the end, I gave up trying to combine contacts and staff member emails after several hours of effort. I created a new static distribution group called GroupNameContacts, placed all staff and contacts in there, then hid it from the address book. I used the following formula to filter a new dynamic distribution group based on the SamAccountName of GroupNameContact to make a Dynamic Dist group for GroupName.

      New-DynamicDistributionGroup -Name "GroupName" -RecipientFilter {(SamAccountName -eq 'GROUPNAMECONTACTS50554764783635')}

      It's a kludgy workaround, but it works.