Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm not really an exchange admin, and I've tried using the Get-Mailbox -ResultSize Unlimited | Export-Mailbox -PstFolderPath c:\pstexport commnand. Which errors out. It screams by and hits each mailbox and fails with the following.

"Error was found for (the user mailbox) because: Error occureed in a step: Approving object" An unknown error has occurred, error code -2147221219"

I added the user (administrator) to the New-ManagementRoleAssignment -Role "Mailbox Import Export" -User administrator

If im doing it wrong let me know, I've just been following guides like from this site here

I really need to get this started tonight so it can be done sometime tomorrow. Until then I'm going to be exporting one at a time through the GUI into outlook then exporting to pst (which is slow and horrible doing it manual)

share|improve this question
What's the rush? Why do you have to do this? What's the goal? (I'm thinking a little more context can help us give better answers.) – ewwhite May 20 '13 at 0:18
Cripes, those directions are horrible. They're using the Outlook interface to pull e-mail into a PST file. Do not use Export-Mailbox if you can help it. Use the MailboxRequest commandlets and do not install Outlook or any part of Office on an Exchange server. – Chris S May 20 '13 at 0:38
up vote 4 down vote accepted

Tested, works in the Exchange Management Shell:

Get-Mailbox -ResultSize Unlimited | ForEach-Object { New-MailboxExportRequest -Mailbox $_.Identity -FilePath ("\\localhost\c$\pstexport\" + $_.Alias + ".pst") }

Use Get-MailboxExportRequest to monitor the status of the process, it will take a while if the mailboxes are large.

Use Remove-MailboxExportRequest to cleanup afterward (use -Status Completed to cleanup while still in process).

share|improve this answer
ForEach-Object : The term 'New-MailboxExportRequest' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:51 + Get-Mailbox -ResultSize Unlimited | ForEach-Object <<<< { New-MailboxExportRequest -Mailbox $_.Identity -FilePath "D :\PSTFiles\" + $_.Alias } + CategoryInfo : ObjectNotFound: (New-MailboxExportRequest:String) [ForEach-Object], CommandNotFoundExcep tion – Funran May 20 '13 at 0:32
1. Do you have the EMS open? 2. Are you sure this is Exchange 2010? – Chris S May 20 '13 at 0:32
Yes I'm sure its Exchange 2010. Yes, I was using Exchange Management Shell. – Funran May 20 '13 at 3:50
You're running 2010 RTM. You need to install SP1, SP2, or SP3... You're dangerously behind on updates. – Chris S May 20 '13 at 4:07
I'm trying to solve someone elses problem so I'm not really an exchange administrator. We're converting over this domain into another environment and I'm just trying to solve this problem. It seems you're right so I'm going to run these updates right now, thanks a ton. – Funran May 20 '13 at 4:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.