Exchange 2007 / 2010 (Pre SP1)- Export Mailbox’s to PST files

KB ID 0000286

Problem

WARNING: This only covers early Exchange 2010 deployments. The procedure changes in Exchange 2010, after you install Service Pack 1. If your Exchange deployment is Exchange 2010, (or newer). Use the New-MailboxExportRequest command instead.

In the days of Exchange 2000/2003 we used to use EXMerge to do this, but with Exchange 2007 (After Service Pack 1) we have the Export-Mailbox PowerShell command.

Solution

As usual there are a number of hoops to jump through first,

Pre-Requisites

1. You must be on a client that is running the x32 bit management tools (Yes I’m aware x32 bit Exchange 2007 is NOT supported for production environments but it IS supported for the use of the Management tools!). For install instructions click here.

2.You must be on a machine that has Outlook 2003 (Service pack 2 or greater) installed.

If you don’t tick these two box’s you will see this error.

[box]

You are running on a 64-bit computer. To export to or import from a .pst file, you must be running a 32-bit computer that has Outlook 2003 SP2 or later install led. At line:1 char:1 + <<<< Get-Mailbox -Database “MailMailbox-Database” | Export-Mailbox -PSTFold erPath mailpst + CategoryInfo : InvalidOperation: (:) [], RecipientTaskException + FullyQualifiedErrorId : C2D0E262

[/box]

3. Your Exchange 2007 server must be at SP1 (at least).

Exchange 2007 Build Numbers = 8.1.0240.006 (SP1) or 8.2.0176.002 (SP2).

To Export a Single Users Mailbox to PST file.

1. Use the following command,

[box] Export-Mailbox -Identity Administrator -PSTFolderpath Mailpst [/box]

Where Administrator is the mailbox “Alias” and Mailpst is the location to host the pst file (Note: you can also use a path like c:pst).

2. Press “y” to confirm and it should complete successfully.

 

To Export a Whole Exchange Mailbox Database to PST file.

1. Use the following command,

[box] Get-Mailbox -database “MailMailbox Database” | Export-Mailbox -PSTFolderpath mailPST [/box]

Where “Mail” is the Exchange server name, “Mailbox Database” is the database name, and Mailpst is the location to host the pst file (Note: you can also use a path like c:\pst).

2. Press “y” to confirm and it should complete successfully.

To Export an Active Directory’s OU’s Users Mailboxes to PST file.

1. Use the following command;

[box] Get-Mailbox -OrganizationalUnit “Sales” | Export-Mailbox -PSTFolderpath MailPST [/box]

Where “Sales” is the Organisational unit, and Mailpst is the location to host the pst file (Note: you can also use a path like c:pst).

2. Press “y” to confirm and it should complete successfully.

Possible Problems and Errors

Problem 1 (MAPI or an unspecified service provider. ID no: 00000000-0000-00000000)

Error:

StatusMessage : Error occurred in the step: Moving messages. Failed to copy messages to the destination mailbox store with error: MAPI or an unspecified service provider. ID no: 00000000-0000-00000000

This is a permissions error you need to grant “Send As” permissions to the the account you are running the command under (i.e. the domain admin account).

issue the following PowerShell command;

[box] Get-MailboxDatabase -identity “MAILFirst Storage GroupMailbox Database” | Add-ADPermission -user “DomainCAdministrator” -ExtendedRights Receive-As [/box]

Where the Exchange server name is “Mail” and the “DomainC” is the domain name.

Problem 2 (This mailbox exceeded the maximum number of corrupted items)

Error: This mailbox exceeded the maximum number of corrupted items specified for this move mailbox operation, error code: -1056749110

The threshold for corrupted items is zero, try upping the limit by adding ” -Baditemlimit 10002 to the end of the Export-Mailbox command i.e.

[box] Get-Mailbox -database “MailMailbox Database” | Export-Mailbox -PSTFolderpath mailPST – Baditemlimit 1000 [/box]  

Related Articles, References, Credits, or External Links

ExMerge Download

Exchange 2010 Bulk Import .pst Files

Exchange 2003 – Exporting Mail to .pst files with ExMerge