How to Export Exchange Mailboxes to PST Using PowerShell?

Exchange and IT administrators may need to export mailboxes from the Exchange mailbox database (EDB) to Personal Storage Table (PST) format for various reasons, such as mailbox backup, migration, archive, or to troubleshoot issues with the mailbox or database.

One can export mailboxes to PST by using PowerShell cmdlets (Exchange Management Shell), Exchange Admin Center (EAC), or Outlook Import Export wizard.

PowerShell cmdlets are preferred to export mailboxes to PST as they provide more control and options for mailbox export. For example, one can add various parameters to create multiple mailbox export requests, add filters, etc.

However, you can’t export mailboxes using PowerShell cmdlets from an offline Exchange database. Besides, you need additional roles and permissions to create mailbox export requests via PowerShell.

If you need to quickly export or migrate multiple Exchange mailboxes to PST, you can use a third-party EDB to PST converter software, such as Stellar Converter for EDB.

The software can export multiple mailboxes from both online or offline Exchange databases to PST files. You can also export the mailboxes from offline database (EDB) files directly to Office 365 or live Exchange Server. It utilizes the Parallel Processing technique that simultaneously exports up to 4 mailboxes to PST, live Exchange Server, or Office 365.

Steps to Export Mailboxes from Exchange Database to PST via PowerShell

Below we have mentioned steps to create mailbox export requests and export mailboxes from online Exchange database to PST format using New-MailboxExportRequest PowerShell cmdlet in EMS.

Step 1: Assign Mailbox Import Export Role

To export mailboxes from the Exchange database to PST, the user account must be assigned with the Mailbox Import Export role. The Mailbox Import Export role is not assigned to any user (not even administrator) by default.

To assign Mailbox Import Export role, follow these steps:

  • Open Exchange Management Shell as administrator and execute the following command:
New-RoleGroup -Role "Mailbox Import-Export Management" -User <USERNAME>

Replace <UserName> with the user account name that you are going to use to create mailbox export requests.

For instance,

New-RoleGroup -Role "Mailbox Import-Export Management" -User "administrator"
assign mailbox import export role
  • To check if the role is successfully assigned, execute the following command:
Get-ManagementRoleAssignment –Role “Mailbox Import Export” | fl RoleAssigneeName
check mailbox import export role

Step 2: Create a UNC Path

A UNC path is required to save the exported PST file. To create a UNC path folder, follow these steps:

  • Create a folder in any internal drive volume, such as C:\ drive. For example, PSTExport.
  • Right-click on the new folder and select Properties.
  • Click on the Sharing tab and then the Advanced Sharing… button.
advanced sharing option
  • Select the Share this folder checkbox and then click the Permissions button.
access permission settings
  • Click Add…, type Exchange Trusted Subsystem, and click Check Names.
Exchange trusted subsystem and authenticated users
  • Choose Exchange Trusted Subsystem and click OK. Also, add Authenticated Users and click OK.
allow change permissions
  • Select Authenticated Users from the list and check the Change checkbox under the Allow column.
apply UNC folder path permissions
  • Do the same for the Exchange Trusted Subsystem.
copy UNC path location
  • Click Apply > OK and copy the UNC path to Notepad.

Step 3: Create Mailbox Export Requests via PowerShell Cmdlets

After assigning the roles and permissions and creating the UNC path, you can execute the following commands in the Exchange Management Shell to export mailboxes from the online Exchange database to PST format.

To export single or individual mailboxes,

New-MailboxExportRequest -Mailbox <MailboxName> -FilePath <UNC PATH>
New-MailboxExportRequest -Mailbox John.C -FilePath \\IB-082\PSTExport

This will create a mailbox export request and export the mailbox to the UNC folder location.

To export multiple mailboxes from the Exchange EDB file to PST, execute the following cmdlets:

$Export = Get-Mailbox

This will create a variable containing all mailboxes.

$Export|%{$_|New-MailboxExportRequest -FilePath \\IB-082\PSTExport\$($.File).pst

This will export all the mailboxes from the Exchange database file to PST at the UNC folder path.

You can check the mailbox export progress by entering the following PowerShell command in EMS:

Get-MailboxExportRequest

or

Get-MailboxExportRequest -Name MailboxExport | fl

To know more about New-MailboxExportRequest PowerShell cmdlet for mailbox export, check out this article.

Conclusion

In Exchange Server, administrators can back up or migrate mailboxes by exporting the required mailboxes from an online database to PST. However, this requires additional permissions and roles which are not assigned to any user. This method is recommended when you need to export a few mailboxes from the database. Exporting multiple databases can put more load on the server and consume significant resources that can affect the server’s performance and lead to downtime.

For exporting multiple mailboxes and mailboxes from an offline Exchange database, you can use an EDB to PST converter software as mentioned in this post. Unlike manual methods, the software automates the export process and allows you to export single or multiple mailboxes from online and offline mailbox databases to PST format. In addition, you can also export multiple mailboxes simultaneously at up to 4x speed from offline Exchange EDB files directly to another live Exchange Server. That too, without additional permissions or impacting the server performance.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Ad Blocker Detected!

We notice you're using an adblocker. We pay $25/month to keep this site running and serve 1 lakh readers a month – but we can't do that for free. We've made a point of never allowing auto-playing video ads or ads that obscure content and pop-ups. Please support us by whitelisting this domain.

How to disable? Refresh