Exchange 2010 export import mailboxes

This post is also available in: Polish

 

Service Pack 1 for Exchange 2010 changed mailboxes import export to .pst file.

After you install Service Pack 1 for Exchange Server 2010 you need to use new CMDlet’s to import or export mailboxes:

  • New-MailboxExportRequest - to export mailbox
  • New-MailboxImportRequest - to import mailbox

To be able to export or import mailbox you need to meet following requirements:

  • have Export Import RBAC rights
  • have network share where you will export mailbox to .pst file

 

Assigning needed rights to export import mailbox from Exchange 2010:

When you write New-MailboxExportRequest in EMS (Exchange Management Console) and you will receive error that this command is not recognized, it means you don’t have adequate permissions.

You have to add Mailbox Import Export role for specified user or security group.

This security group should be universal.

Below command will add necessary permissions for security group MBX_imp_exp:

New-ManagementRoleAssignment -Name "Import Export Mailbox Admins" -SecurityGroup "MBX_imp_exp" -Role "Mailbox Import Export"

 

Exchange 2010 mailbox export

Export or Import operation can only happen to or from network share using UNC Paths.

You can’t export mailbox to .pst file to local drive.

To export John Smith mailbox write:

New-MailboxExportRequest -Mailbox "John Smith" -FilePath \\server\share\JSmith.pst

 

If you want to export only Online Archive mailbox for user, you need to use -IsArchive

Also you can use this parameters:

-AcceptLargeDataLoss – specifies that a large amount of data loss is acceptable if the BadItemLimitis set to 51 or higher. Items are considered corrupted if the item can’t be read from the source database or can’t be written to the target database. Corrupted items won’t be available in the destination mailbox or .pst file..

-BadItemLimit – specifies the number of bad items to skip if the request encounters corruption in the mailbox.

-ContentFilter – specifies message content to search for. Only contents that match the ContentFilterparameter will be exported into the .pst file.

More parameters you can find here:
New-MailboxExportRequest

 

Examples:

Export emails with specified subject:

New-MailboxExportRequest -Mailbox JSmith -FilePath \\server\PST\mymailbox.PST -ContentFilter {Subject -like '*Important*'}

 

Export emails with subject containing Report and received before 10/22/2012:

New-MailboxExportRequest -Mailbox JSmith -FilePath \\server\PST\mymailbox.PST -ContentFilter {(Subject -like "*Report*") -and (Received -lt "10/22/2012"}

 

Export only Inbox folder:

New-MailboxExportRequest -Mailbox myalias -FilePath \\server\PST\mymailbox.PST -IncludeFolders "#Inbox#"

 

You can check status of the export using Get-MailboxExportRequest or Get-MailboxExportRequestStatistics

To see more details about export user Get-MailboxExportRequestStatistics like below:

Get-MailboxExportRequest | Get-MailboxExportRequestStatistics

 

To clear export requests use Remove-MailboxExportRequest 

To clear all completed mailbox exports use:

Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest

 

Below you can find all cmdlets available for Mailbox Export from Exchange 2010:

New-MailboxExportRequest-  start an export operation from a mailbox to a PST
Get-MailboxExportRequest – view mailbox export details
Set-MailboxExportRequest – change the options of an export request
Suspend-MailboxExportRequest – suspend an export request
Resume-MailboxExportRequest – resume a suspended export request
Remove-MailboxExportRequest – remove an export request
Get-MailboxExportRequestStatistics – view a more detailed set of export stats

 

Exchange 2010 mailbox import

Importing .pst file to mailbox can be started using CMDlet New-MailboxImportRequest

To import .pst file to John Smith mailbox use:

New-MailboxImportRequest -Mailbox JSmith -FilePath \\server\share\JSmith.pst

 

like in export you can use -IsArchive to import .pst file to Online Archive user mailbox.

 

When you don’t want to overwrite user emails you can import .pst file to mailbox directly to specified mailbox folder.
Below example will import all emails from .pst file to JSmith mailbox to mailbox folder Import:

New-MailboxImportRequest -Mailbox JSmith -FilePath \\server\share\JSmith.pst -TargetRootFolder Import

 

Like in export operations, also when you import something you can check status of this operation using Get-MailboxImportRequest or Get-MailboxImportRequestStatistics

Below you can find CMDlet’s available for mailbox import to Exchange Server 2010:

New-MailboxImportRequest – start an import operation from a PST to a mailbox
Get-MailboxImportRequest – view mailbox import details
Set-MailboxImportRequest – change the options of an import request
Suspend-MailboxImportRequest – suspend an import request
Resume-MailboxImportRequest – resume a suspended import request
Remove-MailboxImportRequest – remove an import request
Get-MailboxImportRequestStatistics – view a more detailed set of import stats

 

Print Friendly
Tagged , , , , , , , , . Bookmark the permalink.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>