Forum Discussion
Azure AD Connect > Managing with Powershell
Hi Guys,
1. We currently run Azure AD Connect with our 2011 server to Sync with Office 365.
I have a shared mailbox that somehow has the default Microsoft email address as the primary email address.
I have tried many powershelgl commands but I cant seem to correct it.
Can someone please recommend the MSonline module command to set the primary email address on a shared mailbox
Primary is currently: helpdesk@mycompany.onmicrosoft.com > should be helpdesk@mycompany.com
Many Thanks
7 Replies
- MaluksIron Contributor
I guess you have to use Exchange online cmdlets
How to connect to Exchange online:
https://technet.microsoft.com/en-us/library/jj984289(v=exchg.160).aspx
change mailbox address:
http://www.remylarrieu.com/en/office-365-change-a-shared-mailbox-email-address/
- COYO IT SupportCopper Contributor
Thanks for the reply.
I don't think the Powershell for AD connect uses that cmdlet:
I am using the following:
- Import-Module MsOnline
- Enter Connect-MsolService -Credential $credential
I tried Set-Mailbox -Identity oldEmail@domain.com -EmailAddresses newEmail@domain.com
It does not recognise the command Set-Mailbox.
Any ideas
Thanks
- MaluksIron Contributor
it's because MsOnline powershell module does not contain Set-Mailbox cmdlet.
To view all the available cmdlets that are available in MsOnline module you can enter in powershell
get-command -Module msonline