I am working with a client that has a hybrid deployment of Exchange. Their current (manual) process is:
Create the Office 365 mailbox in Exchange on-premise (including owner assignment)
Wait for Azure AD Connect to migrate it to Exchange Online
Convert the user mailbox to a shared mailbox.
I have created scripts to automate most of these but the only thing I am unable to do is assign an owner. I create the remote mailbox via New-RemoteMailbox (Exchange Management Shell). I tried using Add-MailboxPermission with the Owner parameter but it doesn't work.