Exchange on-premises distribution groups migration to Exchange Online

Rakesh Kumar 0 Reputation points
2024-08-27T12:08:41.5066667+00:00

Hello,

We need to migrate on-premises Exchange distribution groups, around 1000, to Exchange Online.

Please share the process and scripts for the same.

Regards,

Rakesh

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,258 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Jake Zhang-MSFT 4,900 Reputation points Microsoft Vendor
    2024-08-28T05:36:08.54+00:00

    Hi @Rakesh Kumar,

    Welcome to the Microsoft Q&A platform!

    Migrating on-premises Exchange distribution groups to Exchange Online involves multiple steps. Here’s a high-level overview of the process:

    1. Prepare for Migration:

       - Ensure that your on-premises environment and Exchange Online are properly configured.

       - Verify that your on-premises Active Directory is properly synchronized with Azure AD using Azure AD Connect.

       - Verify you have sufficient permissions to perform these tasks both on-premises and in Exchange Online.

    1. Directory Synchronization:

       - If you haven't done so already, set up Azure AD Connect to synchronize your on-premises Active Directory with Azure Active Directory (AAD). This will synchronize all your distribution groups to Azure AD.

       - Run a synchronization and ensure all objects are syncing correctly.

    1. Verify Group Data:

       - Confirm that the distribution groups and their memberships are correctly synchronized to Azure AD. You can use the Microsoft 365 admin center or PowerShell to verify this.

    1. Convert to Cloud-Managed Groups (if necessary):

       - If you want to manage the groups in the cloud instead of on-premises post-migration, you might need to convert the synchronized distribution groups to cloud-managed groups. This process involves creating new groups in Exchange Online and migrating the members.

       - You can use PowerShell scripts to automate parts of this process.

    1. Export Group Information:

       - Use PowerShell to export information about your on-premises distribution groups.

    Get-DistributionGroup -ResultSize Unlimited | Export-Csv -Path "C:\DistributionGroups.csv"
    
    1. Create Groups in Exchange Online:

       - Use a PowerShell script to create these groups in Exchange Online.

         $groups = Import-Csv -Path "C:\DistributionGroups.csv"
         foreach ($group in $groups) {
             New-DistributionGroup -Name $group.Name -Alias $group.Alias -PrimarySmtpAddress $group.PrimarySmtpAddress
         }
    
    1. Add Members to Groups:

       - After creating the groups in Exchange Online, add members to these groups based on the exported data.

         foreach ($group in $groups) {
             $members = Get-DistributionGroupMember -Identity $group.Identity
             foreach ($member in $members) {
                 Add-DistributionGroupMember -Identity $group.Name -Member $member.PrimarySmtpAddress
             }
         }
    
    1. Verify Membership:

       - Once the groups are created and members are added, verify the group membership to ensure everything has migrated correctly.

    1. Update or Decommission On-Premises Groups:

       - Update your on-premises groups' attributes to reflect their migration status or decommission them if they are no longer needed on-premises.

    1. Monitor and Test:

        - Monitor the new distribution groups in Exchange Online to ensure they are functioning as expected.

        - Conduct tests to ensure email flows correctly to and from the new groups.

    This is a simplified overview, and the actual steps may vary depending on your specific environment and requirements.

    Please feel free to contact me if you have any queries.

    Best,

    Jake Zhang


  2. DURAI, JEYAKUMAR(Admin) 0 Reputation points
    2024-08-28T06:24:31.54+00:00

    Hi,

    There is no direct migration method available to migrate your Distribution groups from On-premises to Office365. You have to re-create the whole list of Distribution groups in Exchange Online. This method is a bit complicated especially if you have nested groups in your environment.

    All your distribution groups are stored in your Active Directory. Unless you are going to decommission your Active Directory domain, there is no need to migrate/recreate your Distribution groups in Exchange Online.

    0 comments No comments

  3. DURAI, JEYAKUMAR(Admin) 0 Reputation points
    2024-08-28T18:14:19.92+00:00

    If you have firmly decided to recreate the Distribution groups, here are the high level steps.

    1. Get a complete report of all the Distribution groups and Members from On-premises.
    2. Now, Create the Distribution groups in Exchange Online with a Suffix and add all the correpsonding members .(Example : If On-premises DL is Marketing@domain.com, you have to create Exchange Online DL as Marketing-EXO@domain.com). If there are nested DLs, make sure you nest the EXO DLs as well. Make sure you "hide" the EXO distribution groups so that your users wont see them in outlook.
    3. Once you have created all the Distribution groups and added corresponding members to it, Schedule a downtime.
    4. Delete all the On-premises Distribution groups and Perform Azure AD connect sync.
    5. Now, Rename all your EXO distributiongroup email addresses back to its original email address (Example : Marketing-exo@domain.com will be renamed to Marketing@domain.com)
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.