I’ve run into this problem a few times during recent migrations, so I’ve started incorporating the script blocks below into my migration scripts to make sure that I have a consistent experience with moving shared mailboxes, and enabling archive mailboxes.
Issue:
Sometimes msExchange attributes are not properly updated when a mailbox is moved in Exchange. This affects shared mailboxes, as well as creating archives on user mailboxes: https://support.microsoft.com/en-us/kb/2710029. This issue can also cause the mailboxes to show up with the wrong icons in the Exchange console on prem, which can be quite confusing!
Resolution:
Use the following script blocks to update the msExchRemoteRecipientType and the msExchangeRecipientTypeDetails – once these attributes are updated and DirSync has run, mailboxes will show up properly both on premise, and in Office 365. Update $samAccountName with the username you want to update.
Update user attributes to enable archiving:
Set-AdUser $SamAccountName -Replace @{msExchRemoteRecipientType=“3”}
Set-AdUser $SamAccountName -Replace @{msExchRecipientTypeDetails=“2147483648”}
Update AD attributes to disable user account and convert to a shared mailbox:
Disable-AdAccount $SamAccountName
Set-AdUser $SamAccountName -Replace @{msExchRemoteRecipientType=“100”}
Set-AdUser $SamAccountName -Replace @{msExchRecipientTypeDetails=“34359738368”}
This article was a great resource for listing all the different recipient types: http://memphistech.net/?p=457. Hope this helps you solve any mailbox weirdness you run into during migrations!