Commands › Exchange Online
Upgrade-DistributionGroup
Upgrade distribution groups to Microsoft 365 Groups. This cmdlet only works on distribution groups, not mail-enabled security groups. **Note**: Before you use this cmdlet, verify there are no email address policies that you created with the IncludeUnifiedGroupRecipients parameter; otherwise the command will fail. Remove and recreate the email address policies after you upgrade your distribution groups to Microsoft 365 Groups.
Quick start script
# Upgrade-DistributionGroup — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org
# 2. Run and inspect
Upgrade-DistributionGroup -DlIdentities <MultiValuedProperty> | Format-List
# 3. Export for evidence / drift tracking
Upgrade-DistributionGroup | Export-Clixml .\DistributionGroup-$(Get-Date -Format yyyyMMdd).xml
Syntax
Upgrade-DistributionGroup [-DlIdentities] <MultiValuedProperty>
[-ActionType <String>]
[-ExecutingUser <RecipientIdParameter>]
[-Organization <OrganizationIdParameter>]
[<CommonParameters>]
Parameters (4)
Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.