How to export Microsoft 365 mailbox to PST using PowerShell

The following is a comparison between restoring items to an Exchange Online mailbox using Windows PowerShell and RecoveryManager Plus.

Windows PowerShell

Steps to restore mailbox items to an Exchange mailbox using 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 https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking
New-MailboxImportRequest -Mailbox "john@example.com" -FilePath \\SERVER01\PSTFiles\Recovered.pst -TargetRootFolder
Remove-PSSession $Session
Click to copy the script

RecoveryManager Plus

Steps to to restore mailbox items to an Exchange mailbox using 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

Restore on prem mailbox

» Start 30-day Free Trial

Limitation in using Windows PowerShell to restore data to Exchange Online mailboxes:

  • PowerShell doesn't provide granular restorations of mailbox content. RecoveryManager Plus allows you to restore entire Exchange Online mailbox data or just a few items based on your need.

Overcome the limitations of PowerShell by using
RecoveryManager Plus to restore deleted objects.

  •  
     
  • US
  • By clicking 'Download now', you agree to processing of personal data according to the Privacy Policy.

Thank you for downloading!

Your download should begin automatically in 15 seconds. If not, click here to download manually.

  • Get started on your script-free restoration of Exchange Online mailboxes with RecoveryManager Plus
  • US
  • By clicking 'Get your free trial now', you agree to processing of personal data according to the Privacy Policy.

Related Resources

A single pane of glass for AD, Entra ID, Microsoft 365,
Google Workspace, Exchange, and Zoho WorkDrive backup.
  • » Personal WorkDrive backup
  • » Backup retention
  • » Incremental backup
Back to Top
Get QuoteRequest callback
×

Why business choose Recovery Manager Plus

RecoveryManager Plus is an excellent product. It has given us peace of mind that we can quickly recover should something happen to our AD

  
Fabio Freire,Director of Infrastructure,
Sandler O’Neill and Partners

Trusted by over1300+ worldwide companies

  •  
  •  
  •  
  •  
  •  
  •  

Thank you for your interest.

Our support engineers will get in touch with you shortly.

Callback Request

  •  
  •  
  •  
  •  
  • By clicking 'Submit' you agree to processing of personal data according to thePrivacy Policy.