DistributionGroup

Transferring mailing lists Exchange – to – 365

In the on-premises exchange export the Distribution to csv file like this

Open Exchange Management Shell and run:

Get-DistributionGroupMember -Identity SNIFIM | Select Name, PrimarySMTPAddress | Export-CSV "C:\Distribution\ SNIFIM.csv" -NoTypeInformation -Encoding UTF8

After that Delete the Distribution from the on-premises exchange

Go to the Active Directory import the csv file

$DLMembers = Import-CSV "C:\temp\test\SNIFIM.csv"

 Create DistributionGroup on 365 then add them to the DistributionGroup

$DLMembers | Foreach-Object {Add-DistributionGroupMember -Identity SNIFIM -Member $_.PrimarySMTPAddress}

אולי יעניין אותך גם