How do we bulk change Distribution List Primary SMTP from to

Steel Contributor



How do we bulk change 100 Distribution List Primary SMTP from to via powershell?

4 Replies

@Marvin Ocowith something like that:



Get-DistributionGroup | ? { $_.PrimarySmtpAddress -like "*"} | % { Set-DistributionGroup -PrimarySmtpAddress "$($_.PrimarySmtpAddress.Split('@')[0])" -WhatIf }


@Daniel Niccoli 

It looks like it wants an identity argument passed to it...

PS > Get-DistributionGroup | ? { $_.PrimarySmtpAddress -like "*"} | % { Set-DistributionGroup -PrimarySmtpAddress "$($_.PrimarySmtpAddress.Split('@')[0])" -WhatIf }

cmdlet Set-DistributionGroup at command pipeline position 1
Supply values for the following parameters:
My view:

How to Execute Bulk Updates of Primary SMTP Address for Distribution Lists

Like any mail-enabled object managed by Exchange Online, distribution list proxy addresses determine if Exchange can deliver messages to an object. Sometimes the proxy addresses aren’t correct or need adjustment, such as in the case when an organization wants to make sure that all distribution lists have primary SMTP addresses from a specific domain. This article explains how to use PowerShell to adjust the primary SMTP address when necessary.