This comes into play when an employee leaves an organization. The mailbox is deleted in O365, but the manager wants a copy of their mailbox as a subfolder in their own mailbox before the soft deleted mailbox is gone for good. Here is what to do:
Connect to Exchange Online:
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Get the GUID of the deleted mailbox
Get-Mailbox -SoftDeletedMailbox | select name,guid
Issue the restore command
New-MailboxRestoreRequest -SourceMailbox GUIDFROMABOVE -TargetMailbox
Once the restore has began, you should see a sub folder with the name you chose in the inbox of the target account. To monitor the restore progress, use this
Get-MailboxRestoreRequest | fl