I came across this issue last week, and to be honest was a little surprised. I’m sure I’d used it before, probably before Exchange 2010 SP2, so just expected it to work.
Let’s say you’ve built a Hybrid Exchange 2010 SP2 / Office 365 environment. You create a user, using your provisioning tool of choice – for this example we’ll say Active Directory Users and Computers:
So generally, running Enable-RemoteMailbox should work, in the same way running Enable-Mailbox should work too – all the components in Exchange are configured correctly, and if you create a mailbox using New-RemoteMailbox or the Exchange Management Console everything works.
However, the following happens:
The error – for the purposes of people searching for it is The Address @tenant.mail.onmicrosoft.com is invalid: “@tenant.mail.onmicrosoft.com” isn’t a valid SMTP address. The domain name can’t contain spaces and it has to have a prefix and a suffix, such as example.com. FullyQualifiedErrorID : F0109C5E,Microsoft.Exchange.Management.Recipient.Tasks.EnableRemoteMailbox.
I did a quick search on the net, and didn’t find any answers however I did find someone having the same problem. Sadly they hadn’t had much luck with forum support or Office 365 support.. So I had a little bit more of a look into the issue and found that the solution in most cases should be fairly simple.
When enabling the remote mailbox, use the –RemoteRoutingAddress parameter, specifying your alias and service domain/Office 365 tenant, for example:
Enable-RemoteMailbox <username> -RemoteRoutingAddress <alias>@<tenantName>.mail.onmicrosoft.com
After using the command as shown above, the remote mailbox should be created and thus provisioned correctly by DirSync:
A few points of note in addition – if you’ve configured your Hybrid organization the “old” way – i.e. you’ve got a service domain, replace the above <tenantName>.mail.onmicrosoft.com with your chosen Service Domain (i.e. service.contoso.com). And the original poster to the question I answered on TechNet found in his environment, he needed to use the –Alias parameter also to get things moving.
Hope this helps