Exchange PST import and Export

Exchange mailboxes are used by companies for storage of information such as emails, contacts, and events, etc. With the assistance of email clients, this information available on the server can be fetched and modified. Sometimes data migration is required for enabling offline access while in situations where data corruption occurs in Exchange due to a malware attack or a system failure, migration of data to another platform can help in the recovery of the mailboxes involved.

In today’s post, we will talk about everything you need to know regarding export and import of Exchange Mailboxes to PST files. So, without any further delay let us start this post.

The Problem

From time to time, a user might need to import or export data for taking backup of a mailbox, for testing a new environment or for responding to any compliance request. Usually, the data is imported or exported in PST file format. This format is convenient for all types of situations.

The Prerequisites

Before carrying out the import or export tasks of Exchange mailbox, you need to have specific user rights or the prerequisites.

User Rights: In role-based access control, your account should have the role of ‘Mailbox Import Export Management’ assigned. You can carry out this role-assigning by simply following the steps below:

• Open ‘Active Directory Users and Computers’ for the creation of a security group named ‘Mailbox Import-Export’.

• Once the group has been created, add your account to it.

• Open the Exchange Management Shell and run the command:

New-ManagementRoleAssignment -Name "MailboxImportExport" -SecurityGroup "Mailbox Import-Export" -Role "Mailbox Import Export"

with the appropriate security group name.

• Log off the system and then back on in order to make the new role active for your account.

Directory Access: The Exchange requires a UNC path-based access to a directory that can be a share on the server that can be setup using the following steps:

• For access to newly created PST files, create an Exchange network share for their storage.

• Add permissions of read/write to ‘Exchange Trusted Subsystem’ group for this network share.

Challenges

Following errors can occur during the export or import of Exchange mailboxes.

1. The error "MAPI or an unspecified service provider with ID no: 00000000-0000-00000000: Failure of message copying to the destination mailbox".

To resolve this error simply grant ‘Send As’ permissions to the account being used for export/import with the command ‘Get-MailboxDatabase -identity “MAILFirst Storage GroupMailbox Database” | Add-ADPermission -user “DomainAdministrator” -ExtendedRights Receive-As’. In this command, ‘Mail’ is the Exchange server name and ‘Domain’ is the domain name.

2. The error "maximum corrupted item exceeding the mailbox limit with code no: -1056749110".

To resolve this error, increase the limit for corrupted items by adding ‘-Baditemlimit 1000’ at the end of the export command i.e. ‘Get-Mailbox -database “MailMailbox Database” | Export-Mailbox -PSTFolderpath mailPST – Baditemlimit 1000’

Solutions

A. Exchange 2010 SP1 and Higher Versions

The procedure of the export and import methods described here can be used on all Exchange versions newer than 2010 SP1.

Import Method

The following methods detail how you can import data from PST files into mailboxes. The commands listed here are examples, therefore, substitute the values as required.

1. PST file to primary mailbox import

Run the command:

New-MailboxImportRequest -Mailbox username -FilePath \\fileserver\pst\username.pst -TargetRootFolder "RecoveredFiles" -IncludeFolders "#Inbox#"

Substitute ‘username’ with the alias of the mailbox owner that requires data import. The imported data will be present in the RecoveredFiles folder.

2. PST file to archive mailbox import

Run the command:

New-MailboxImportRequest -Mailbox username -IsArchive -FilePath \\fileserver\pst\username.pst\archive.pst

with the name of mailbox owner. The imported content will merge with the existing data present in the archive.

3. Multiple PST files import

For import of multiple PST files present in the shared folder, run the command:

Dir \\fileserver\pst\*.pst | %{ New-MailboxImportRequest -Name RecoveredPST -BatchName Recovered -Mailbox $_.BaseName -FilePath $_.FullName -TargetRootFolder SubFolderInPrimary}

Export Method

The following methods show ways to export mailbox to a PST file.

1. Primary mailbox to PST file Export

The process of exporting mailbox is similar to the PST import. Run the command:

New-MailboxExportRequest -Mailbox username -FilePath \\fileserver\pst\username.pst’

2. User archive to PST file export

Run the command:

New-MailboxExportRequest -Mailbox username -IsArchive -FilePath \\fileserver\pst\username.pst’

Substitute the username with the name of the mailbox owner whose archive folder needs to be exported before running the command.

3. Specific data from mailbox to PST file export

Here we have written a command on how to export messages of userxyz received before 2 July 2018 with the word risk and control in the message body. You can substitute the values as per your requirements in the command:

New-MailboxExportRequest -Mailbox userxyz -ContentFilter {(body -like "*risk*") -and (body -like "*control*") -and (Received -lt "02/07/2018")} -FilePath \\fileserver\pst\userxyz.pst

B. Exchange Server 2007

In order to export data to PST file for a single mailbox follow the steps given below:

• Run the command:

Export-Mailbox -Identity Administrator -PSTFolderpath Mailpst

in which the alias is administrator and location for PST file hosting is Mailpst.

• Enter ‘y’ in order to complete the process successfully.

You can export the whole database of Exchange to PST file by using the following steps:

• Type in the command:

Get-Mailbox -database “MailMailbox Database” | Export-Mailbox -PSTFolderpath mailPST

in which exchange server name is mail, the database name is mailbox database and PST file location is mailpst.

• Enter ‘y’ for completion of export.

Third-party Tools

You can utilize reliable third-party tools such as Stellar EDB to PST Converter for a flawless conversion. This is an amazing tool used by professionals for online and offline conversion of EDB files into PST files. This tool can do both single and multiple mailbox conversions and has the ability to recover mailboxes that are accidentally deleted.

Conclusion

So, this was our take on how to export and import exchange mailboxes to PST files. We hope our article was helpful in explaining all the ways in which these imports and exports can be carried out. Let us know which method you have used in the comments below.

Export & Import Exchange Mailboxes to PST Files
Tagged on:         

Leave a Reply

Your email address will not be published. Required fields are marked *

*