Forum Discussion
Is there a way to change O365 group email address using powershell
- Oct 12, 2017If you want to update the Email Address of the Office 365 group, please follow below steps.
O365 Group Name :- Test O365Group
Current Email addres :- test.o365@abcd.onmicrosoft.com
Update to :- test.o365@abcd.com
Follow below script in powershell.
Set-UnifiedGroup -Identity "Test O365Group" -EmailAddresses: @{add="SMTP:test.o365@abcd.com"}
Hi There,
Yes there is a way that you can make that change. Please take a look at the PowerShell script below.
PowerShell ISE is strongly recommended. (Copy Paste as it is and Run)
cls
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Write-Output "======================================================="
Write-host "======== CONFIGURING O365 GROUP EMAIL ADDRESS =========" -foreground "yellow"
Write-Output "======================================================="
$oldEmail=read-host "Which O365 Group email address do you want to edit? Ex: group@domain.onmicrosoft.com"
$newEmail=read-host "Please enter the new email address for $oldEmail Ex: group@domain.com"
Set-Group -Identity $oldEmail -WindowsEmailAddress $newEmail
Write-Output "======================================================="
Write-host "=============== COMPLETED SUCCESSFULLY ================" -foreground "green"
Write-Output "======================================================="
Get-Group -Identity $newEmail | select display*,windows*
Once you run this scrript you will be asked to import to the module please choose yes to all to allow the necessary modules and then log in. After your log in you will be asked to provide the current email of the group and after that you will be asked to type the new email. Within 2 minutes the change will apply and you can see it on your EAC and please close your browser and re-open it and sign into Portal.office,com and the changes will appear under groups on Admin portal as well.