Mar 02 2017 10:25 AM - edited Mar 06 2017 09:16 AM
Mar 02 2017 10:25 AM - edited Mar 06 2017 09:16 AM
My organization wants to change email address of O365 group. I am not able to find any power shell to change email address of already created O365 group. I tried below command but it is not working.
Set-unifiedgroup -identity testo365 -primarysmtpaddress test123O365@qqq.onmicrosoft.com
Can someone please provide your thoughts on this.
Mar 02 2017 11:01 AM
Give a look to this thread: https://techcommunity.microsoft.com/t5/Office-365-Groups/Renaming-of-O365-groups/td-p/4758
Hope it helps...
Mar 02 2017 11:05 AM
You seem to have one additional "-" character in front of the address, remove it and it should work fine.
Mar 06 2017 09:14 AM
I am not using that extra charecter. It was a mistake in my typo.
Mar 06 2017 11:54 AM
So do you get any error when running the cmdlet or?
Oct 12 2017 02:12 AM
SolutionOct 16 2017 06:48 PM
"
@Yahkoob Ayappally wrote:
If 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"}
If I use that command, I get the following error:
There are multiple primary SMTP addresses. Please ensure there is only one primary address for each address type."
Oct 18 2017 09:31 PM - edited Oct 28 2017 09:15 PM
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
Oct 26 2017 09:48 PM
Oct 28 2017 09:15 PM
Dec 05 2017 06:28 AM
Hi, I have a question, I would like to change all existing O365 Groups which have a wrong e-mail address:
Get-UnifiedGroup -Filter {EmailAddresses -like '*@abd.onmicrosoft.com'} | Set-UnifiedGroup -PrimarySmtpAddress but I Need some variable for the Name before the @, do you have an Idea?
Thanks and best regards,
Luciano
Dec 05 2017 08:28 PM
Hai Luciano,
Good Day.
Yes It is possible, you can add new email ID and you can promote your new Email ID as an SMTP and you can remove your Old Email ID. But performing this steps, you need a global Administrator access.
Please follow below 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.
Eg:- 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.Hope this will help you and let me know if you are facing any issue on this.
Thanks and Regards,
Yahkoob Ayappally
Dec 14 2017 12:20 PM
Jan 03 2018 02:05 AM
Jan 03 2018 02:08 AM
good to know that 🙂
Jan 30 2018 12:49 PM
Mar 07 2018 10:03 PM
Thanks for share! works for me amazingly!
Mar 10 2018 11:57 PM
cool always welcome Howard 🙂
Jun 19 2018 04:29 AM
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?
Jun 20 2018 12:42 AM
Oct 12 2017 02:12 AM
Solution