0

I've an Hybrid setup with Exchange On-Premise and O365.

What i want to do is export Exchange On-Premise distribution list with members (what i already done it) with the following code (Found in internet):

$Result=@()
$groups = Get-DistributionGroup -ResultSize Unlimited`
$totalmbx = $groups.Count
$i = 1
$groups | ForEach-Object {
Write-Progress -activity "Processing $_.DisplayName" -status "$i out of $totalmbx completed"
$group = $_
Get-DistributionGroupMember -Identity $group.Name -ResultSize Unlimited | ForEach-Object {
$member = $_
$Result += New-Object PSObject -property @{
GroupName = $group.DisplayName
Member = $member.Name
EmailAddress = $member.PrimarySMTPAddress
RecipientType= $member.RecipientType
}}
$i++
}
$Result | Export-CSV "C:\Folder\FileName.csv" -NoTypeInformation -Encoding UTF8

I want to stop the sync from Exchange On-Premise to O365 and create directly the DL's in O365.

Can i import this exported list with members directly? If so can you please help me telling how?

Thanks in advance.

Sleepy
  • 1

1 Answers1

0

Glad to know this issue is resolved by yourself. You could share it here.And you could mark the helpful replies as answers, this will make answer searching in the forum easier and be beneficial to other community members as well.

There is a script about moving the groups to Office 365: PowerShell Script to Move Exchange Distribution Groups to the Cloud https://gallery.technet.microsoft.com/PowerShell-Script-to-Move-5c3cd668

Jayce
  • 804
  • 5
  • 5
  • 1
    Hi there Jayce Yang, what i've done is mentioned in this website: https://www.tecknowledgebase.com/6445/how-to-export-distribution-lists-from-on-premises-exchange-and-import-to-exchange-online-office-365/ – Sleepy May 14 '20 at 12:59