Answer:

DDLs refer to groups that are built up on the fly, based off certain filters and conditions that need to be defined when sending messages. They are defined through PowerShell scripts or through the Exchange Management console (by an Exchange administrator).

They then use those conditions to query Active Directory to build the list of users that the message will get sent to.

 Our tool does not support the migration of DDLs. Also, DirSync or ADDSync will not synchronize DDLs either.

 Below are a couple of options for handling DDLs.

1) You could export the group list that is generated by such DDL’s, by running such a script:

$members = Get-DynamicDistributionGroup -Identity “dynamicgroupname”
Get-Recipient -RecipientPreviewFilter $members.RecipientFilter | select Displayname,PrimarySmtpAddress> membersall.txt

 2) You could obtain the actual DDL queries from Active Directory Users and Computers Snap in, by following these steps:

  • Right-click on your query 
  • Select Export Query definition
  • Select from the save as type:
  • Text (Comma Delimited) (*.csv)

 You could then create the DDLs in Office365 via PowerShell.

Here is an example to create a dynamic distribution group with UserMailbox and City as the filters:

  1. Connect to Exchange Online using remote PowerShell.
  2. Run the command:
    New-DynamicDistributionGroup -Name “DDG_NAME” -RecipientFilter {RecipientType -eq “UserMailbox” -and City -eq “CITY_NAME”}