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.

  •  
     
  •  
  • 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.

  • Embark on your script-free AD Self-service password management with ADSelfService Plus.
  •  
  • By clicking 'Get your free trial 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.

Related Resources

A single pane of glass for Active Directory, Azure Active Directory,
Microsoft 365, Google Workspace, and Exchange Backup.
  • » Personal WorkDrive backup
  • » Backup retention
  • » Incremental backup