Restore emails from Old Mailbox (Inactive/Deleted) to New Mailbox

 If a user returns AFTER their Account has been deleted and is in inactive state.

 -          Must run a Restore, NOT a recover.   A recover will bring back the mailbox to the cloud and it can’t be linked to the newly created on prem AD account. 

-          Must create the new on prem account with a different name than the old account.   This will be temporary to restore the mailbox, then the account can be renamed to the same as the old account.

Procedure (Eg. John Smith – username was jsmith)

1.       Following the entire New User Setup instructions, create account j.smith

2.       Run this command to get the ExchangeGUID of jsmith’s inactive mailbox:

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

3.       Run this command to store the inactive mailbox to a variable

$InactiveMailbox = Get-Mailbox -InactiveMailboxOnly -Identity <ExchangeGUID>

4.       Run this command to copy contents of inactive jsmith mailbox to new j.smith mailbox

New-MailboxRestoreRequest -SourceMailbox $InactiveMailbox.DistinguishedName -TargetMailbox j.smith@xyz.com -AllowLegacyDNMismatch

5.       Run this command to see progress of restore

Get-MailboxRestoreRequestStatistics -Identity "Username\MailboxRestore"

6.     If there is an archive, run this command to restore archive from jsmith to j.smith:

New-MailboxRestoreRequest -SourceMailbox $InactiveMailbox.DistinguishedName -SourceIsArchive -TargetMailbox j.smith@xyz.com -TargetIsArchive -TargetRootFolder "Inactive Mailbox Archive" -AllowLegacyDNMismatch

7.       Run this command to see progress of restore

Get-MailboxRestoreRequestStatistics

8.     Once the restore is complete, rename the AD account and Exchange alias to jsmith. Edit email addresses to remove all entries for j.smith

9.     Have user login and verify they have the contents of their old mailbox

10 . Delete inactive mailbox.

No comments: