How to restore a Exchange mailbox to another mailbox during deletion

When deleting a mailbox, you do not want to lose data. It is not easy to perform tasks such as restoring mailboxes in Office 365.
That is why I created this blog to help migrate data from an old to a new mailbox.
Don't think of it as backup... But the ideal scenario is when someone leaves service, that you can import all items into another mailbox. OR in case of an acquisition or merger.
There are 3 options:
- Either you keep the mailbox in its current state(1). And keep it active with a licence in use.
- Or convert it to a shared mailbox(2). And the data remains intact without a single manipulation - or conversion to shared mailbox.
- A 3rd option is to delete this mailbox and migrate the data to another mailbox. A mailbox which is in use. In this blog I will explain how you can restore the data to another mailbox. (3)
Restoring deleted items can be done via the new Exchange Control Panel.
Prerequisites for connecting to PowerShell
Install the Exchange PowerShell modules via this blog.
Install the Azure AD Powershell module via here.
Change the UserPrincipalName of the user you wish to delete
It is a choice to change the UPN before deleting the user. From experience it is better to do so. Otherwise you will not be able to transfer this UPN and the e-mail address.
Set-MsolUserPrincipalName -UserPrincipalName shared1@365tips.be -NewUserPrincipalName bepidf@etexgroup.onmicrosoft.com
Delete the desired Office 365 user
Delete a shared mailbox or a user via admin centre.

Connect-MsolService Get-MsolUser -ReturnDeletedUsers Remove-MsolUser -UserPrincipalName AllanD@Jasper********.com -RemoveFromRecycleBin -Force
Force the user removal: RemoveFromRecycleBin -Force

Connect to Exchange Online via PowerShell
In this blog you can find more information about Exchange Online .
Connect to Exchange online via: Connect-Exchange Online .
Enter your username and password. (Global Administrator)
Connect-ExchangeOnline get-mailbox -SoftDeletedMailbox -Identity AllanD@********.com | fl exch,archive*

Copy the ExchangeGuid into Notepad to keep an overview.
Retrieve the Exchange Mailbox to which you want to import the mail items
get-mailbox info@365tips.be | fl exch,archive*

Create the job to transfer the old mailbox contents to the new mailbox
Construct the MailboxRestoreRequest using this format.
SourceMailbox = Exchange Guid of the deleted mailbox.
TargetMailbox = Exchange Guid of the future mailbox.
New-MailboxRestoreRequest -SourceMailbox 04784e3d-ccc7-46af-bc0d-a556710fdd57 -TargetMailbox 775f1478-be65-4607-90c6-818a2d1561e9 -AllowLegacyDNMismatch -Verbose
The source is shown in red.
The target is shown in yellow.

The mailbox restore has been started in Exchange Online
The MailboxRestoreRequest is a job that will restore the mailbox to the new mailbox. (target)

Request a migration status via PowerShell?
To query a status, enter the following command.
Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics


How can you perform a quality check on the imported e-mails?
In this image you can see that all mails from Allan have been migrated to the mailbox of info@365tips.be.
On the right you can see that this user is logged in as info@365tips.be.
In the mail recipient you see Allan.
Don't forget to migrate the archive as well!
This can be done in the same way but with the ArchiveGuid.

Also readthese Office 365 Exchange blogs
Setting up Out of Office on a Office 365 Shared Mailbox
Retrieve deleted Exchange e-mails - New Exchange Portal
Set up forwarding in Office 365 | Forward e-mails
Remove Azure AD Connect and make all objects cloud managed
Automatically store sent items in your shared mailbox