See my answer in this thread:
https://learn.microsoft.com/en-us/answers/questions/151562/exchange-migration-to-o365-should-you-migrate-all.html
Convert On premises Distribution Lists to O365 Distribution Groups
Hello
I plan to remove my hybrid configuration. How can I convert my on premises Distribution Lists to O365 Distribution Groups. I currently have approx. 5000 Distribution Lists
-
Andy David - MVP 150.3K Reputation points MVP
2020-12-22T13:28:00.657+00:00
2 additional answers
Sort by: Most helpful
-
The Exchanger 56 Reputation points
2020-12-22T20:24:57.767+00:00 Hello
Based on your response, I'll have to manually recreate all 5000 distribution groups on O365 which is very manual and tedious. Also, nested groups will be a nightmare.
Will I get bounces during the time I delete and recreate the groups???
Will this PowerShell script handle nested groups???
https://gallery.technet.microsoft.com/PowerShell-Script-to-Move-5c3cd668Is there a more automated way???
-
KyleXu-MSFT 26,271 Reputation points
2020-12-23T02:25:05.193+00:00 You can use using script to recreate groups in Exchange online. But, the script mayn't suitable for nested groups. Because, if group B contained in group A, the script need to create B first. If the script create group A before group B, it will cannot find group B and add it as the member of group A.
You may could using script to create all blank groups which doesn't contain group members first, then create membership for those groups later. Please note, the Exchange Q&A forum doesn't supported the writing of scripting so far, you may need to complete this script by yourself or open a ticket to phone team for more professional support.
Indeed, if you still using the Exchange on-premises, you will not need to migrate groups to Exchange online, you just need to sync those groups AD account to AAD, those groups will could be used in Exchange online(The relationship still hosted on Exchange on-premises.)
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.