Forum Discussion
The question nobody dares to ask! How do you create a new user in a hybrid environment.
- Mar 20, 2017
The best practice is whatever works for your user management workflows. You can create it either way. In a hybrid you can move mailboxes back and forth whether they were created on-prem or in the cloud.
One caveat with New-RemoteMailbox is that it can't do Shared mailboxes. Those you need to create on-prem and then move, or, create in EXO as a user mailbox and then convert to Shared. Either way, same result.
Environment: Exchange 2010 SP3 and Exchange Online hybrid.
I have tried the create account in on-prem Exchange 2010 and migrate method and the Exchange Management Shell (EMS) method and found that EMS method is most efficient for me. Below is the command string I'm using.
New-RemoteMailbox -UserPrincipalName "[flast@MyCompanyDomain.com]" -Name "[First Last]" -Alias "[First.Last]" -RemoteRoutingAddress "[First.Last]@MyCompanyTenant.mail.onmicrosoft.com" -FirstName "[First]" -LastName "[Last]" -DisplayName "[First Last]" -OnPremisesOrganizationalUnit "[OU Where I Want User's AD Account]"
I did find that if I used the -PrimarySmtpAddress switch with New-RemoteMailbox, there was the unintended consequence of disabling the email address policy for the mailbox, creating Exchange Online to on-prem Exchange email delivery and calendar free/busy issues. This can be resolved by using the following command.
Set-RemoteMailbox -Identity [mailbox name] -EmailAddressPolicy $true
I hope this helps someone save some time.
Also, to give credit to the person that solved the issue caused by me using the -PrimarySmtpAddress switch.
https://community.spiceworks.com/topic/2164592-issue-with-new-remote-mailbox-user-creation-in-hybrid-exchange