Every now and then I get a question regarding creation of Room- or Shared Mailboxes in Office 365 when Exchange Hybrid is in place.There are multiple solutions available, but at the same time there are some restrictions as well. In this blog post I’ll discuss Room Mailboxes, Equipment Mailboxes and Shared Mailboxes.
Room Mailbox
To create a room Mailbox in your hybrid environment create a user account for this room mailbox first. In this example I’m going to create a Room Mailbox called ‘conference room 1st floor’ and have it created directly in Office 365 (for your information, I’ve tested this with Exchange 2010 hybrid as well as Exchange 2016 hybrid).
To create the Mailbox in Exchange Online, you can use the Enable-RemoteMailbox cmdlet in Exchange PowerShell. This will mail-enable the account in your on-premises environment and will automatically create a mailbox in Exchange Online the next time Azure AD Connect runs. For the Enable-RemoteMailbox cmdlet you need to use the -RemoteRoutingAddress (which should point to the Mailbox in Exchange Online) and for a Room Mailbox you have to use the -Room option. If you want to create a Shared Mailbox you can use the -Shared option, the result will be the same.
To create the Room Mailbox in Exchange Online we can use the following command:
Get-User -Identity Conference1 | Enable-RemoteMailbox -Room -RemoteRoutingAddress conference1@inframan.mail.onmicrosoft.com
When Azure AD Connect has run, the account has been provisioned in Azure AD and the Room Mailbox has been created. It is visible in Exchange Online EAC and permissions can be granted to other users can manage the Room Mailbox.
Resource (Equipment) Mailbox
To create a Resource (aka Equipment) Mailbox the process is very similar. First create a user account for the Equipment Mailbox in Active Directory and fill the appropriate attributes, like this:
To create the Equipment Mailbox directly in Exchange Online, execute the following in PowerShell (on your on-premises Exchange server):
Get-User -Identity AVEquipment | Enable-RemoteMailbox -Equipment
-RemoteRoutingAddress avequipment@inframan.mail.onmicrosoft.com
Again, when Azure AD Connect has run, the account is provisioned in Azure AD and the Mailbox is created in Exchange Online:
Shared Mailboxes
Createing Shared Mailboxes is a bit problematic, after all these years there’s still no option like -Shared when using the Enable-RemoteMailbox cmdlet in Exchange PowerShell so we have to figure out another way to create a Shared Mailbox in Exchange Online when using Azure AD Connect and a Hybrid environment.
<more to come soon>
Enable-RemoteMailbox do not support -shared, this always a gap here since early day and I really hope microsoft will fix this. The “right” way is to create the shared mailbox onpremises then move it. OR you need to make some attribute changes manually
LikeLike
Time to do some additional homework, thanks for the feedback.
LikeLike
How are you getting on with that “additional homework”? 😉
Seriously though, every page I’ve found so far on this subject mentions using the -Shared option, but the option doesn’t (or no longer) exists in the cmdlet. As such everytime I run it the mailbox is created as a Regular mailbox.
LikeLike
#Get 365 Mailbox Guid:
Import-Module ExchangeOnlineManagement
$UserCredential = Get-Credential
Connect-ExchangeOnline -Credential $UserCredential -ShowProgress $true
Get-Mailbox username@domain.com | fl ExchangeGuid
# > ExchangeGuid : 1279f99b-cd6f-43ce-a3df-094573653a23
Disconnect-ExchangeOnline
#Create Remote User Mailbox:
Enable-RemoteMailbox username@domain.com -RemoteRoutingAddress username@domain.mail.onmicrosoft.com
#Change to Remote Shared Mailbox:
Set-ADUser -Identity ((Get-Recipient username@domain.com).samaccountname) -Replace @{msExchRemoteRecipientType=100;msExchRecipientTypeDetails=34359738368}
#Change Mailbox Guid to match 365:
Set-RemoteMailbox username@domain.com -ExchangeGuid 1279f99b-cd6f-43ce-a3df-094573653a23
LikeLike
Hi Jaap, again a very valuable article. Thanks! Did you already write an additional article about this, specifically about creating shared mailboxes in hybrid (or non-hybrid but directory sync enabled) ?
LikeLike
In the Exchange Hybrid scenario you can also run New-RemoteMailbox in your on-premises Exchange Management Shell to create an on-premises AD user account and *user* mailbox in Exchange Online (you need to provide the -remoteroutingaddress as Jaap documented above). Wait for Azure AD Sync or run it manually and then, in a new PowerShell session connected to Exchange Online, convert the user mailbox to shared using Set-Mailbox -Type Shared -Identity “mailboxname”
LikeLike
If you’re running Exchange 2013 in a hybrid scenario, make sure you create the room mailboxes in the appropriate place. Create your room mailboxes for your on-premises organization on-premises, and room mailboxes for Exchange Online should be created in the cloud. See: https://technet.microsoft.com/en-us/library/jj215781(v=exchg.160).aspx
LikeLike
-Shared is available and working on our on-prem Exchange 2016 Server. You have to use the local EMS, not the Online one. It’ll show up in AD and the local on-prem servers Shared recipients. Let it sync (or force it in AzureConnect), and it’ll show up in EOL shortly
LikeLike
Because of your comment I noticed I never finished the blogpost (in 2017) haha… Thanks!
LikeLike