Next
Next
Get-Mailbox "Alex.User@example.com" | fl > mailboxinfo.txt
You’ll use the LegacyExchangeDN value from mailboxinfo.txt later.
Disable-Mailbox "Alex.User@example.com"
Confirm
Are you sure you want to perform this action?
Disabling mailbox "Alex.User@example.com" will remove the Exchange properties from the Active Directory user
object and mark the mailbox in the database for removal. If the mailbox has an archive or remote archive, the archive
will also be marked 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"): Y
Enable-RemoteMailbox "Alex.User" -RemoteRoutingAddress "Alex.User@example.mail.onmicrosoft.com"
Name RecipientTypeDetails RemoteRecipientType
---- -------------------- -------------------
Alex User RemoteUserMailbox ProvisionMailbox
mailboxinfo.txt.LegacyExchangeDN./o=Contoso/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=1234567890ABCDEF1234567890ABCDEF-Alex User
Set-RemoteMailbox -Identity "Alex.User" -EmailAddresses @{add="x500:/o=Contoso/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=1234567890ABCDEF1234567890ABCDEF-Alex User"}