How to restore deleted Exchange mailbox using PowerShell
The following is a comparison between restoring items to an Exchange mailbox using Windows PowerShell and RecoveryManager Plus.
Windows PowerShell
- Change the execution policy in your PowerShell to Remote Signed.
- Provide the credentials of a user who has the Mailbox Import Export role.
- Create a new PowerShell session.
- Initiate a new import request and provide the mailbox where the data is to be restored and the location where the PST file is stored.
- Terminate the PowerShell session once the restore operation is complete.
Sample script:
Set-ExecutionPolicy RemoteSigned
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<ServerFQDN>/PowerShell/ -Authentication Kerberos -Credential $UserCredential
Import-PSSession$Session-DisableNameChecking
New-MailboxImportRequest -Mailbox "john@example.com" -FilePath \\SERVER01\PSTFiles\Recovered.pst -TargetRootFolder
Remove-PSSession $Session
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<ServerFQDN>/PowerShell/ -Authentication Kerberos -Credential $UserCredential
Import-PSSession$Session-DisableNameChecking
New-MailboxImportRequest -Mailbox "john@example.com" -FilePath \\SERVER01\PSTFiles\Recovered.pst -TargetRootFolder
Remove-PSSession $Session
RecoveryManager Plus
- Navigate to Exchange tab > Restore.
- Select the backup of the mailbox that contains the data to be restored and click Review and Restore.
- Select the items you want to restore to the mailbox.
- Select the mailbox to which the data is to be restored and click Restore.
Screenshot
Limitation in using Windows PowerShell to restore data to Exchange mailboxes:
- PowerShell doesn't provide granular restorations of mailbox content. RecoveryManager Plus allows you to restore entire Exchange mailbox data or just a few items based on your need.
Overcome the limitations of PowerShell by using
RecoveryManager Plus to restore deleted objects.
Thank you for downloading!
Your download should begin automatically in 15 seconds. If not, click here to download manually.