Restore emails from soft deleted mailbox

 

1.      Run this command to get the necessary information about the mailbox:

Get-Mailbox -InactiveMailboxOnly | FL Name,DistinguishedName,ExchangeGuid,PrimarySmtpAddress

 

2.      Run this command to store the mailbox to a variable.  (Identity here is the ExchangeGUID for Adam Platt and was gathered from running the previous command)

 

$InactiveMailbox = Get-Mailbox -InactiveMailboxOnly -Identity 12341111-8d44-46fe-a41c-55234234

 

3.      Run this command to restore the contents of the inactive mailbox to an existing mailbox, while specifying a top-level folder in the target mailbox in which to restore the contents from the inactive mailbox. If the specified target folder or target folder structure doesn't already exist in the target mailbox, it is created during the restore process. 

New-MailboxRestoreRequest -SourceMailbox $InactiveMailbox.DistinguishedName -TargetMailbox user@xyz.com -TargetRootFolder "user's Inbox" -AllowLegacyDNMismatch

 

4.      Restore the contents of the archive from the inactive mailbox to the archive of an existing mailbox, while specifying a specific folder:

New-MailboxRestoreRequest -SourceMailbox $InactiveMailbox.DistinguishedName -SourceIsArchive -TargetMailbox user@xyz.com -TargetIsArchive -TargetRootFolder "user’s Archive" -AllowLegacyDNM

                                                OR

Restore the contents of the archive from the inactive mailbox to existing mailbox inbox folder, while specifying a specific folder:

 

New-MailboxRestoreRequest -SourceMailbox $InactiveMailbox.DistinguishedName -SourceIsArchive -TargetMailbox user@xyz.com -TargetRootFolder "user’s Archive" -AllowLegacyDNMismatch

 

No comments: