User Account is already deleted in AD.
User Mailbox is already deleted in Exchange.shell
1. Connect to Exchange Online service in Windows PowerShell command line.ide
$UserCredential = Get-Credentialui
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirectionrest
Import-PSSession $Session -DisableNameCheckingorm
2. Restore mailbox with InactiveMailboxOnly parameter.blog
$InactiveMailbox = Get-Mailbox -InactiveMailboxOnly -Identity <identity of inactive mailbox>get
New-MailboxRestoreRequest -SourceMailbox $InactiveMailbox.DistinguishedName <-SourceIsArchive> -TargetMailbox targetaccount@contoso.com -TargetRootFolder "TargetUser_Restored01" -AllowLegacyDNMismatchit
3. Check status of mailbox restoration.io
Get-MailboxRestoreRequest -TargetMailbox targetaccountgui
4. Check restored mails in target mailbox.
Get-MailboxFolderStatistics -Identity targetaccount | select Name, FolderPath, FolderSize | Format-Table -AutoSize