Forum Discussion
Change O365 group email address using powershell
Using Set-Group seems to do the trick:
Set-Group "GroupName" -WindowsEmailAddress "NewPrimaryEmail@domain.com"
I tested updating a group's primary domain with Set-Group and, while it did update the primary email in exchange, it still shows with the old domain in lists. Using Get-MsolGroup, I can see that not all of the properties were updated on the AzureAD side of things. I'm hoping they will fix the problem with set-unifiedgroup soon, as I have a bunch of groups that were supposed to be transition to a new domain on Monday!
- Tim CreanJun 06, 2018Iron Contributor
I am also trying to add an email address and then update the new email address to be primarysmtp on a number of old O365 groups. I can add the new email address just fine, but get the "We failed to update the Unified Group" when I try to set the new address as PrimarySMTP.
Also, not sure if related to this issue, but Set-UnifiedGroup does no appear to be accepting a value for the -HiddenFromExchangeClientsEnabled parameter. If I try to set the parameter to $true, I get, "A positional parameter cannot be found that accepts argument 'True'."
'
From everything I have seen, I should be able to use that parameter so that certain groups will not appear/be discoverable in Outlook and Outlook on web clients.
- VasilMichevJun 06, 2018MVP
Nino_Bilic sorry, don't have a ticket number, was just relaying what the user posted on TechNet.
Tim Crean HiddenFromExchangeClientsEnabled is a SWITCH parameter, thus you have to use the following syntax (no space!):
Set-UnifiedGroup HiddenFromExchangeClientsEnabled:$false
- Tim CreanJun 06, 2018Iron Contributor
VasilMichev - thank you very much, that did the trick!