question

Arni-3472 avatar image
0 Votes"
Arni-3472 asked joyceshen-MSFT commented

On-prem Distribution List Migration

Hello Experts,

Is it possible to migrate our on-prem Distribution List to Exchange Online? Currently, we are managing our DL in our Active Directory which syncs to the cloud. I heard that there's a script that can do this. If you happen to know the script, could you kindly share me that information. I also would like to know if this script method will move the nested group. What would be the cause and effect if there's a way to do it? Your input is greatly appreciated.

Thanks

office-exchange-server-administration
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

joyceshen-MSFT avatar image
0 Votes"
joyceshen-MSFT answered

Hi @Arni-3472

Yes, two ways can be used to migrate your distribution groups.

  1. Sync your groups using AAD Connect, however note that we can only manage the groups from on-prem server side.

  2. As you said above, using powershell script to create new group in cloud. So that you can manage them in cloud.

Below is an article which provide related script and step-by-step guide to perform the operation:
Migrate Distribution Groups from Exchange On-Premise to Exchange Online

Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.


If an Answer 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.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Arni-3472 avatar image
0 Votes"
Arni-3472 answered joyceshen-MSFT commented

@joyceshen-MSFT thank you for this info. We are currently using the number one method that you've suggested and managing our on-prem DL via Active Directory. We don't have an on-prem Exchange server. We have hybrid because we're still managing DLs using the AD. However, we actually want to get rid of this hybrid including managing Distribution Groups in our AD. The focus right now though is to export all these DLs that is on the AD to Exchange Online so that we only have one place to manage it (e.g. Exchange Online).

I read method number two and in my opinion this is kind of complicated and I will need guidance on this (especially if this is not coming from Microsoft, no guarantee) I would like to try this script by testing a few Distribution group test accounts and see what will happen, but the instructions seemed to be focus on exporting all the DLs. I wonder if that script (e.g. $groups = Get-DistributionGroup -ResultSize Unlimited -IgnoreDefaultScope) can be modify to specific group only, just for testing purposes?

Thank you.





· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Arni-3472

Yes, if you want to test only one specific group, Get-DistributionGroup -Identity "group name"
We could also use -filter to choose some groups meet the value, for example

Get-DistributionGroup -Filter "Alias -like 'xxx'"

More information: https://docs.microsoft.com/en-us/powershell/module/exchange/get-distributiongroup?view=exchange-ps

1 Vote 1 ·

Hi @joyceshen-MSFT

II was trying the script and run into some errors:

Get-DistributionGroup : The term 'Get-DistributionGroup' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:2 char:11
+ $groups = Get-DistributionGroup -Identity Test_All -IgnoreDefaultScop ...
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-DistributionGroup:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException


You cannot call a method on a null-valued expression.
At line:11 char:105
+ ... mtpAddress ;Get-DistributionGroupMember -Identity $guid.ToString() -R ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

I was wondering if this should be done in Exchange Management Shell? I was using the PowerShell ISE. Any input is greatly appreciated, thanks.

0 Votes 0 ·

Hi,

Where did you run the command? Please run the command in Exchange management powershell rather than windows powershell.

And the right permission for this command:

117302-image.png


0 Votes 0 ·
image.png (17.5 KiB)
Show more comments