Skip Ribbon Commands
Skip to main content
Sign In





รายละเอียดครบถ้วน สมบูรณ์











How do I export Distribution Lists from your on-premises Exchange and import them into Exchange Online Office 365
How can I export distribution lists from the server on premises
Exporting Distribution Lists
I will describe my steps to transfer these distribution list from an server on premises onto the cloud-based Office 365 Exchange online.You can decide to export the files to various paths, it's your choice. This guide will be based on the paths I have used.

Create an unnamed file on the C drive that is called Scripts
Use the following command to access your server on premises Exchange Management Console.

It will then export distribution lists, but only the.

Get-DistributionGroup | select-object Name, PrimarySMTPAddress, grouptype | export-csv c:\scripts\distributionlists.csv
Exporting Distribution Lists Memberships
Copy the text from the link below to notepad then save it as DistributionGroupMemberReport.ps1


To find out information about your distribution lists to gather data on your distribution lists, execute the following script on the Microsoft Exchange management console on your server of origin.
Usage is .\DistributionGroupMemberReport.ps1 and then select option 2 to export to a csv

After running the script, you will notice this.
Open the CSV you created earlier and change the name of the the Primary STMP address as PrimarySMTPaddressand Distribution Group to DistributionGroup.
Save it to c:\scripts\distributionlistmembers.csv

How do I transfer the Distribution Lists that you exported into Exchange online
Copy the text from the link below to notepad then save it as distributionlists.ps1 on C:\scripts\


Open PowerShell, and connect it to Office365.

Input the credentials for your Office 365 Global credentials

$LiveCred = Get-Credential
Design Your Office 365 Session

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $LiveCred -Authentication Basic -AllowRedirection
Import the session above

Import-PSSession $Session
Run the script you created above: C:\scripts\distributionlists.ps1 it will import the distribution lists to Exchange online

PDLs for Populating Distribution Lists Membership

Import-Csv c:\scripts\distributionlistmembers.csv | foreach
Now that you've got your distribution lists on-premises moved into Office 365 Exchange Online

Make sure you remove your remote PowerShell session after you've finished. When you shut down your Windows PowerShell window without disconnecting the session, you may make use of all remote PowerShell sessions that are available and must wait until the sessions expire. To shut off from the Remote PowerShell session, execute this command.

Remove-PSSession $Session
I have just followed the steps listed below and made this guide. It works well. If you have any queries, please write a comment down below.

If you enjoy it, click the Like button.

If you would like to be updated on the latest posts, you can follow us on Facebook.;u=157172;area=summary;u=180729;u=12955*sh_/*sh_/*sh_/*sh_/*sh_/*sh_/;u=364681;area=summary;u=60074*sh_/

Created at 12/5/2565 18:02 by ***
Last modified at 12/5/2565 18:02 by ***