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 John,
Steps to change Office 365 group Email address:-
Current SMTP address :- test.o365group@abcd.onmicrosoft.com
Required SMTP address :- test.o365group@abcd.com
Follow the below steps in power shell using Global Administrator Credentials,
1. Connect to Exchange Online via Power shell using Global Administrator Credentials and run the below commends. First two command run separately.
Set-ExecutionPolicy Unrestricted
Start-service winrm
Import-module MSOnline
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Connect-MsolService -Credential $UserCredential
2. Run the below command to add required SMTP address as an alias.
Set-UnifiedGroup -Identity "X" -EmailAddresses: @{Add ="Y"}
here X is the Display Name of Office 365 group and Y is the required Email ID.
Set-UnifiedGroup -Identity "Test o365Group" -EmailAddresses: @{Add ="test.o365group@abcd.com"}
3. Promote alias as a primary SMTP address,
Set-UnifiedGroup -Identity "Test O365Group" -PrimarySmtpAddress "test.o365group@abcd.com"
4. If not required, you can remove first ID using below command.
Set-UnifiedGroup -Identity "Test o365Group" -EmailAddresses: @{Remove="test.o365group@abcd.onmicrosoft.com"}
Please note, For updating the Office 365 group SMTP address required Global Administrator access.
Thanks and Regards,
Yahkoob Ayappally
Thanks for share! works for me amazingly!
- Yahkoob AyappallyMar 11, 2018Brass Contributor
cool always welcome Howard :)
- DeletedJun 19, 2018
works like a charm so Thx, one thing it doesn't seem to do I want to change from Capitals to lowercase
WORD@mail.com to word@mail.com
any advice/suggestions?
- Yahkoob AyappallyJun 20, 2018Copper ContributorHi Susan,
Thanks for your update!!!
I think you don't worry about the capital and small letters, its case sensitive and you can ignore it. I hope you can change the capital to small letters because mail system is considered as a both are same email address. You can spread your group email ID as usual with word@mail.com and you will receive all emails.
Let me know if you have a more query.
Regards,
Yahkoob A