Share via


Export Exchange 2010 Database into PST Format.

Importing or exporting data from or to a .pst file format is extremely easy using the MailboxImportRequest and MailboxExportRequest cmdlets. Both cmdlet's are part of Exchange Management Shell.

After a request to Import or export has been submitted, the process is carried out by Mailbox Replication Service (MRS). The Exchange Mailbox Replication Service is available in Exchange 2010 Client Access servers. The MRS is the service that is responsible for transferring mailboxes, and importing and exporting  mailbox data to .pst files. 

Using MailboxImportRequest cmdlet one can move .pst files into particular mailbox or archive folder. The process discussed is the simplest method to transfer file from local computer to Exchange Server.
Timely backup process can avoid bulk migration of mailbox databases. This will reduce the import or export time period and also data security is maintained.
Both the cmdlet utilities are free of cost and have their own advantages of the usage. Let us go through the positive aspects of the services provided by the Microsoft for user’s import and export request.

Using the application PST files can be imported directly to the personal archive of the user.
Large number of PST files can be imported and exported at the same instance of time.
The process of Import and Export are simultaneous and uses queuing and throttling features.
The PST files are available on shared network drives which are accessible by Exchange servers.
Before performing any crucial process it is mandatory to analyze important points which results in successful completion of the process. In the case of Importing and Exporting files too user must consider following aspects to experience expected result:

Before Importing or Exporting mailbox data a network shared folder must be accessible by the Exchange Server. The read/write permission should be granted to trusted Exchange subsystem group. The error message will be experience by the user if the read/write permission is not granted.
The PST file size must not be greater than 50GB as this is the permissible size limit of Outlook. However user can create multiple PST files having size more than 50 GB in total, intended to a specific folders.
The MRS is the crucial feature that enables user to perform move or restore mailbox process. The queuing and throttling of process is handled by MRS.
The data cannot be imported to public folder or public folder database.
Till now we were engaged in discussing about the whereabouts of the essential aspects that user must consider while importing or exporting the data. Let us now understand the process of Importing and Exporting of mailbox data in detail:

Import of mailboxes:

In-order to Import data from .pst file to mailbox or archive folder user can make use of MailboxImportRequest cmdlet. User cannot import data to a user account that does not possess any mailbox. User can however import the data to a different user account other than the one it was exported. Let us understand various Mailbox import request cmdlets:

New-MailboxImportRequest: Using this cmdlet user starts the process of importing a .pst file to a mailbox or personal archive. User can initiate more than one import request but each request must have a unique name.
Set-MailboxImportRequest: Updates or modifies the import request option after the request is created or recovered from the failed request.
Suspend-MailboxImportRequest: The cmdlet suspends an import request after the request is created but it must be executed before the request reaches the status of completed.
Resume-MailboxImportRequest: It resumes suspended or failed request.
Remove-MailboxImportRequest: It removes fully or partially completed import requests. One must clear the completed request as they are not removed automatically.
Get-MailboxImportRequest: This cmdlet is used to view the general information about an import request.
Get-MailboxImportRequestStatistics: It shows detailed information about an import request.
Export of Mailbox data:

User can implement MailboxExportRequest cmdlet to export mailbox data into a PST file. User can export one or multiple mailboxes but only single request is processed at a time. Let us know about this feature in detail:

New-MailboxExportRequest: It starts the process of exporting data from a mailbox or archive folder to a PST file format. Just like previous Import feature, user can request more than one export request but the name must be unique.
Set-MailboxExportRequest: It changes export request options after the request is created or recover from failed request
Suspend-MailboxExportRequest: It suspends an export request any time after the request is created but before the request reaches the state of completion.
Resume-MailboxExportRequest: It resumes an export request that was suspended or failed.
Remove-MailoxExportRequest: This removes fully or partially completed export requests. User must clear the completed request as they are not automatically removed.
Get-MailboxExportRequest: It shows general information about an export request.
Get-MailboxExportRequestStatistics: It shows detailed information about an export request.
Exporting Exchange 2010 Mailboxes to PST:

In this section we will focus upon the process by which we can export mailbox data into PST format. The process can be done for both single mailbox and multiple mailboxes.

Export single mailbox to PST in Exchange 2010:

It is essential to acquire RBAC permission, following steps can be done to attain that:

#Add ”MailboxImportExport” RoleAssignment to the admin.            
New-Managmentroleassignment-Role ”MailboxImportExport”-User”Administrator”            
#After this create a folder on a network drive and share it.            
#Then Run the "New-MailboxExportRequest" cmdlet to export the mailbox            
New-MailboxExportRequest –Mailbox “MailboxName” -FilePath \\ServerName\PST\MailboxName.pst New-MailboxExportRequest            

Export all mailboxes to PST:

$Export = Get-Mailbox             
$Export|%{$_|New-MailboxExportRequest -FilePath “file://servername/pst/$($_.alias).pst”}

Export Mailboxes with specific folders:

$Export = Get-Mailbox            
#Specifying folders and sent items,               
$Export|%{$_|New-MailboxExportRequest -IncludeFolders “#Sent Items#,#Inbox#” -FilePathfile://servername/pst/$($_.alias).pst}