Forum Discussion
User has cloud and on premises mailbox. How to keep the cloud one and delete the on premise one?
Run these command on you On-Prem Exchange Server
Disable-Mailbox -identity "userx"
Result:
Disabling mailbox "userx" will remove the Exchange properties from the Active Directory user object and markthe mailbox in the database for removal. If the mailbox has an archive or remote archive, the archive will also bemarked for removal. In the case of remote archives, this action is permanent. You can't reconnect this user to the remote archive again.
[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"): A
Then this command :
Enable-RemoteMailbox "userx" -RemoteRoutingAddress "userx @ contoso.mail.onmicrosoft...."
Result will be like this
Name RecipientTypeDetails RemoteRecipientType
---- -------------------- -------------------
Userx RemoteUserMailbox ProvisionMailbox