During my short time with O365 and especially the Exchange Hybrid configuration, I did discover the one of the hardest things to do is to decide which is the best course of action for creating new mailboxes. Either create them on-prem first and then do a migration to the cloud or start from the cloud and then configure a remote mailbox at the on-prem?
Personally i do prefer creating the remote mailbox and the O365 user/mailbox at once by using the New-RemoteMailbox command. But there is something missing in the parameters , the Shared Mailbox trigger.
So for creating a mailbox in the a Hybrid environment, and then if it is needed to make a Shared on we would first connect to Exchange management shell, use the get-Credential command to set the username and credentials that you will use for the mailbox.
[PS] C:\>New-RemoteMailbox -name “test shared1” -Password $cred.password -UserPrincipalName email@example.com
And after running the above command you will have the result below, which creates a user mailbox on the O365 and a remote mailbox in the on-prem with a Routing E-mail address pointing to the firstname.lastname@example.org.
The last thing that was left for us to do , in case we need a Shared mailbox, is to go to the O365 Exchange admin portal > Recipients > Mailboxes and search for the newly created user mailbox. At the right side there is the option to convert it to a shared mailbox and we have to wait for the process to finish.
Afterwards at the Recipients > Shared you can search for the freshly converted mailbox and add the needed permissions or configuration that you have to.
Again thank you for your time reading this guide.