Saturday, 30 March 2013

Exporting a Mailbox to PST on Exchange x64

Strangely, you cannot run the Export-Mailbox command on a 64-bit version of Exchange Server 2007 in order to export a mailbox to a PST file.

Instead you need to
  • create a 32-bit VM (say Windows XP 32 bit)
  • Join that machine to your domain
  • install Outlook (32-bit) onto it
  • Install IIS Common Files from Add Or Remove Windows Components
  • download and install the Exchange Management Tools for 32-bit
  • Login as Domain Admin
then run the Export-Mailbox command from the Exchange Management Shell.

export-mailbox -identity <user> -PSTFolderPath c:\backup\<filename>.pst

This then fails with

Are you sure you want to perform this action?
Exporting mailbox content from the mailbox '<User>' into .pst file
<filename>.pst'. This operation may take a long time to complete.
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):a

Export-Mailbox : Error was found for <User> because: 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, error code: -1056749164
At line:1 char:15
+ export-mailbox <<<<  -identity <User> -PSTFolderPath <Path>
    + CategoryInfo          : InvalidOperation: (0:Int32) [Export-Mailbox], Re
   cipientTaskException
    + FullyQualifiedErrorId : 2742F138,Microsoft.Exchange.Management.Recipient
   Tasks.ExportMailbox

This is because the running user does not have permission to access the mailbox.

Run

Get-Mailbox | Add-MailboxPermission -User "<YourUserName>" -AccessRights FullAccess
and repeat

export-mailbox -identity <user> -PSTFolderPath c:\backup\<filename>.pst

1 comment:

  1. This comment has been removed by the author.

    ReplyDelete