Dynamic Distribution Group Query Optimization Update for Live@edu and Office 365 Exchange Online

    This download contains a migration script that can be used to improve dynamic distribution group performance in Live@edu and Office 365 Exchange Online.
    • Version:


      File Name:


      Date Published:


      File Size:

      37 KB

        This download contains a migration script an administrator can use to improve query performance when determining membership in dynamic distribution groups.
        • This script can be used with Live@edu and Office 365 Exchange Online, and can also be run on an on-premises Exchange server running Microsoft Exchange Server 2010 SP2 or later.
        • This script should only be used if you are currently using dynamic distribution groups based on delimited user data in a custom attribute. For example, if you store current class schedules in CustomAttribute1 for each mailbox, you might have data like the following: "Math101;Humanities101;Writing101".
        This script was developed to take advantage of new multi-value custom attributes that are now available in Exchange Online and Exchange 2010 SP2 for all recipient types. Multiple values no longer have to be stored in string custom attributes.
        • The script copies user data from the old string custom attributes to the new multi-value custom attributes, and modifies the filters of existing dynamic distribution groups to reference the new custom attributes and use more efficient search operators.
        • The script can be run in two modes: by default, it just identifies possible optimizations, and with the Update parameter, it makes the changes.
    • Supported Operating System

      Windows 7, Windows Server 2008 R2, Windows Vista, Windows XP

      • Exchange:
      • Windows PowerShell
      • Get started:
        Download and save the migration script. To run it for Exchange Online, save it on any computer that has Windows PowerShell. To run it on an Exchange server, save it on the Exchange server.

        You will need the following permissions to run the script:
        • To run the script on your Exchange Online organization, you must be an administrator for that organization.
        • To run the script on your Exchange server, you must be a member of the Exchange Administrators group.

        Run the migration script:
        1. In a PowerShell window, connect to the cloud-based service. For more information, see Connect Windows PowerShell on your local computer to the cloud-based service
          Or, if you are using an on-premises Exchange server, run Exchange Management Shell on the server.
        2. Go to the folder containing the script, and type:
        3. The following options are available:
          • To preview changes the script can make, but not actually make the changes, run the script without the Update parameter:
          • To copy data into the new multi-value extension custom attributes and update your dynamic distribution groups filter criteria:
            migrateddg.ps1 -Update
          • To combine two existing custom attributes into a single new multi-value extension custom attribute:
            migrateddg.ps1 -Update -CustomAttributeMap @{CustomAttribute1="ExtensionCustomAttribute1"; CustomAttribute2="ExtensionCustomAttribute1"}
          • To specify the delimiter if you have one custom attribute with many fields concatenated, such as "Math101;Physics101;English101":
            migrateddg.ps1 -Update -Delimiter ";"
          • To log the changes made, specify a file name:
            migrateddg.ps1 -Update -Logfile "c:\mylogfile"
          • To specify the organization if you have multiple domains or sub-domains:
            migrateddg.ps1 -Update -Organization <domain>
          • To view the possible parameters:
            migrateddg.ps1 -?

        For more information:

    Popular downloads

    Loading your results, please wait...

    Free PC updates

    • Security patches
    • Software updates
    • Service packs
    • Hardware drivers

    Microsoft suggests

    Office 365 on the devices you love. Buy now.
    The Office you love, on the devices you love
    Includes PC, Mac, smartphone, and tablet—starting at $6.99/month.
    Buy and download