Hi @Glenn Maxwell ,
Agree with michev.
Script to "convert" Unified Groups to Distribution Lists.
The script first gets a list of Unified Groups and saves it in a constant.
$Groups = Get-UnifiedGroup -ResultSize Unlimited
It then gets the PirmarySmtpAddress for each group.
$Groups | ForEach-Object {
$group = $_
$GroupEmail = Get-UnifiedGroup -Identity $group.Name | select PrimarySmtpAddress
Next, we get the Members from each group and save them.
Get-UnifiedGroupLinks -Identity $group.Name -LinkType Members | ForEach-Object {
New-Object -TypeName PSObject -Property @{
Group = $group.DisplayName
GroupEmail = $GroupEmail.primarysmtpaddress
Member = $_.Name
EmailAddress = $_.PrimarySMTPAddress
RecipientType= $_.RecipientType
We then export the members, import the members that are sorted by unique group email.
Export-CSV “C:UnifiedGroupMembers.csv” -NoTypeInformation -Encoding UTF8
$distro = Import-Csv C:UnifiedGroupMembers.csv | sort GroupEmail –Unique
Now we delete the Unified Group and insert a pause of 30 seconds
$distro | foreach{Remove-UnifiedGroup -Identity $_.GroupEmail -force}
Start-Sleep -s 30
Lastly we create Distribution list with the members that we got from the Unified Groups.
$distro | foreach{New-DistributionGroup -Name $_.Group -primarysmtpaddress $_.GroupEmail}
Import-CSV “C:UnifiedGroupMembers.csv” | foreach {Add-DistributionGroupMember -identity $_.GroupEmail -member $_.EmailAddress}
As a supplement, when a Unified Group is created there is a Calendar, OneNote, SharePoint Online site and a OneDrive for business Storage added to it.
If your users start using this feature, then the data within those locations will be deleted.
More information for your reference:
https://github.com/oliveir3/Convert-Office-365-Groups
Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make sure that you completely understand the risk before retrieving any suggestions from the above link.
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.