How to Export Exchange Mailbox to PST using PowerShell Commands

0
10201
power shell

As the demand of accessing EDB file in MS Outlook is increasing, the method of exporting Exchange Mailbox to PST using PowerShell is also increasing. But still, there are some users who do not know how to move Exchange mailboxes to Outlook PST? Thus, this article explains PowerShell commands to export Exchange mailbox to PST format in detailed.

An Exchange Server mailbox basically stores all data items such as contacts, emails, calendar, events etc., in it. Moreover, all this data is stored on the server and can be accessed and updated using an email client. However, sometimes a user wants to access the Exchange mailbox data in offline mode also. Therefore, to do the same, one needs to convert EDB to PST format to access it in MS Outlook and in offline mode also. Moreover, this conversion is helpful in the case of virus attack, mailbox corruption or hardware failure. As there are many solutions available that a user can use to migrate from Exchange Mailbox to Outlook but the most effective solution is using PowerShell. Hence, a manual method to export Exchange mailbox to PST using PowerShell is covered in the following segments of this article.

Solutions to Export Exchange Mailbox to PST Format

To export single or multiple mailboxes from Exchange Server into Outlook PST file, there is a different set of PowerShell commands forc converting Exchange mailbox contents to a PST file. So, here cmdlets for both are discussed.

Approach #1: Export Single Exchange Mailbox to Outlook PST using PowerShell

To transfer data from Exchange 2016 mailbox to Outlook, follow the steps given below:

  • First of all, go to Start menu and open the PowerShell window
  • After that, over the network, make a shared folder and save the PST file, which includes exported Exchange mailbox data in the shared folder
  • Now, you need to execute add–PSSnappin to add library files that are mandatory for the export command. Type the following command:

Add-PSSnapin Microsoft.Exchange.PowerShell.e2016

  • Next, it’s time to execute MailboxExportRequest cmdlet, which contains two main parameters:
    • FilePath: Represent the PST file network share path on which data is to be exported
    • Mailbox: Determine the SMTP address or the name of the mailbox that you need to export
  • After that, run the MailboxExportRequest command by following the syntax below:

New-MailboxExportRequest -Mailbox user -File_Path \\server FQDN\shared folder name11\PSTfilename.pst

  • After executing the above commands the Exchange 2016 mailbox is exported successfully into PST file format. You can check it by going to the location where you have saved it.

Moreover, if you wants to export selective data from Exchange mailbox to PST then, you need to use some additional parameters mentioned below:

Exclude or Include Folder: In order to move only specific folders from Exchange Mailbox to Outlook, run the command below:

New-MailboxExportRequest -IncludeFolders “#Inbox#/*”,”#SentItems#” -Mailbox user -FilePath \\server FQDN\shared folder name11\PSTfilename.pst

This command will export only Inbox and SentItems folder from Exchange Mailbox to Microsoft Outlook PST format. One can specify any other folders also in the same syntax based on their choice.

IsArchive: If archive is the only source of export option, the run the command below:

New-MailboxExportRequest -Mailbox user -IsArchive -FilePath \\server FQDN\shared folder name11\PSTfilename.pst

Content Filtering: In order to perform mailbox content filtering, one can easily specify any condition also. For example, export all items before 02-02-2016. For this run the syntax below:

New-MailboxExportRequest -Mailbox user -ContentFilter {(Received -lt ’02/02/2016′) -and (Subject -like ‘fwd*’)} -FilePath \\server FQDN\shared folder name11\.pst

Set Unique Name of Export Request: If a user wants, can set unique name for the export request. This can also help in tracking. Now, to do the same execute command below:

New-MailboxExportRequest -Name unique_name -Mailbox user -IsArchive -FilePath \\server FQDN\shared folder name11\PSTfilename.pst

Approach #2: Export Multiple Exchange Mailboxes to PST Format

If a user wants to export more than one mailbox to PST format, the commands are almost same with little changes. Now, to export multiple Exchange mailboxes to PST format by following the steps below:

  • Move all mailboxes to a variable like, $AllMailboxes11 = Get-Mailbox
  • After that, convert all mailboxes to PST files with names based on mailbox aliases

$AllMailboxes11|%{$_|New-MailboxExportRequest -FilePath \\server FQDN\shared folder name11\$($_.Alias).pst}

  • If a user wants to use the additional parameters, then it can be used just as discussed in the case of single mailbox exports.

Drawbacks of Exporting Exchange Mailboxes to PST using PowerShell

There are limitations that a user might encounter while converting offline EDB to PST using PowerShell commands and all of them are discussed below:

  • These PowerShell commands does not help in recovering corrupt Exchange EDB file.
  • One first need to delete the current mailbox request before starting the new mailbox request.
  • Moreover, the PowerShell commands are quite complex and hard to understand. Therefore, a user needs to be technically strong to use them.

Alternative Solution to Export Exchange Mailbox to PST

To avoid all the limitations that a user might encounter while exporting Exchange mailboxes to PST file format using PowerShell commands, one is advised to use EDB to PST converter software. It is a simple and easy solution to export Exchange mailbox to Outlook PST format. It also allows users to export selective data items also. Moreover, it recovers corrupt EDB files also without any hassle.

Final Word

Sometimes users want to access Exchange mailbox data in Outlook in order to avail offline mode facility. Also, to prevent Exchange mailbox corruption and virus attack it is advised to export EDB to Outlook PST format. Thus, considering user requirement, a method to export Exchange mailbox to PST using PowerShell commands is discussed. However, a manual solution is not a hassle-free solution so, to have an easy-to-use method one can go for an alternative solution i.e. EDB to PST Converter. It is a one-stop solution to convert and recover corrupt EDB to PST file format.