Oct 01 2019 05:43 PM
How do we bulk change 100 Distribution List Primary SMTP from contoso.onmicrosoft.com to contoso.com via powershell?
Oct 02 2019 04:14 PM - edited Oct 02 2019 04:15 PM
@Marvin Ocowith something like that:
Get-DistributionGroup | ? { $_.PrimarySmtpAddress -like "*@contoso.onmicrosoft.com"} | % { Set-DistributionGroup -PrimarySmtpAddress "$($_.PrimarySmtpAddress.Split('@')[0])@contoso.com" -WhatIf }
Oct 13 2023 12:59 PM
It looks like it wants an identity argument passed to it...
PS > Get-DistributionGroup | ? { $_.PrimarySmtpAddress -like "*@autoreturn.com"} | % { Set-DistributionGroup -PrimarySmtpAddress "$($_.PrimarySmtpAddress.Split('@')[0])@autura.com" -WhatIf }
cmdlet Set-DistributionGroup at command pipeline position 1
Supply values for the following parameters:
Identity:
Oct 17 2023 02:28 AM