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,448 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Jake Zhang-MSFT 9,090 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 people found this answer helpful.

  2. DURAI, JEYAKUMAR(Admin) 85 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.

    1 person found this answer helpful.
    0 comments No comments

  3. DURAI, JEYAKUMAR(Admin) 85 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 ******@domain.com, you have to create Exchange Online DL as ******@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 : ******@domain.com will be renamed to ******@domain.com)
    0 comments No comments

  4. Narayana V 0 Reputation points
    2025-02-25T10:52:50.38+00:00

    Migration of Mail Enabled Security Group from Exchange On-Premise 2016 to Exchange Online

    As part of the migration to Exchange online, all the mailboxes are migrated to Exchange Online. Now, we are left with Distribution lists and Mail enabled security groups(around 5000) needs to be migrated to Exchange Online. Please share the impact on SPO, and other resources. And what are the scripts to get the sites and applications are using these Mail enabled security groups. Please share the step by step script to migrate them?

    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.