Need help bulk exporting mailboxes

  • Thread starter David Alge
  • Start date Views 2,037
Status
Not open for further replies.
D

David Alge

I am trying to export several mailboxes in bulk and getting errors. I am going into the Exchange Shell and performing the following command:

[PS] C:\pstexport>Get-Mailbox -Database " Tier3-500MB" -ResultSize Unlimited | Export-Mailbox -PstFolderPath " C:\PSTEXPORT"
Directory 'C:\PSTEXPORT' does not exist, please create it first and try again.
+ CategoryInfo : ObjectNotFound: :)) [], RecipientTaskException
+ FullyQualifiedErrorId : 9D2F87F0

Invoke-Command : Cannot write input as there are no more running pipelines
At C:\Users\dalge\AppData\Roaming\Microsoft\Exchange\RemotePowerShell\qhsvmail2.qualitestrx.com\qhsvmail2.qualitestrx.c
om.psm1:6705 char:29
+ $scriptCmd = { & <<<< $script:InvokeCommand `
+ CategoryInfo : InvalidOperation: :)) [Invoke-Command], PSInvalidOperationException
+ FullyQualifiedErrorId : NoMoreInputWrite,Microsoft.PowerShell.Commands.InvokeCommandCommand

This is after I gave my ID the export and import role permissions. As you can see, the folder that I specified for the PST's is created but it tells me that it isn't. I will be eventually exporting all mailboxes and decided to export based on our smallest database first.

Thanks so much for your help,

David
 
D

David Alge

We have not upgraded to SP1, so this command " New-MailboxExportRequest" is not available to us I am assuming as I got errors saying it wasn't available. The last updates on our Exchange was one of the last rollups prior to SP1. Since we will be moving these mailboxes to a mailserver outside of our domain, I don't have plans to upgrade to SP1. Is there a script or command I can use to export all mailboxes on our Exchange 2010 server to PST's without the need or requirement to go to SP1?
 
T

Troy Werelius

I personally think you are better of to upgrade to SP1 since its not as complicated to do exports and many problematic issues on the import export process were resolved as well. Also SP1 does away with the requirement for Outlook to be on the box. Another option to consider is to use a 3rd party utility like Lucid8's DigiScope http://www.lucid8.com/product/digiscope.asp which is straight forward, has a nice GUI and there are also affordable project based licenses However, if you really want to try the 2010 RTM export here is the scoop

Currently, there is a known bug where export-mailbox and import-mailbox commands will not work on an Exchange Server that has the CAS server role installed together with the Mailbox role. If this is a case in your environment you will have to either export via Outlook or install a separate Exchange machine with only Mailbox role and Outlook 2010 64-bit in order to be able to do mass export/import.
ASSIGNING NECESSARY ROLE AND PERMISSIONS
Members of the Microsoft Exchange Security Group " Organization Management" have the authority to assign the " Mailbox Import Export" role to other users.
To assign the " Mailbox Import Export" role to an individual user use the following syntax:
New-ManagementRoleAssignment -Role " Mailbox Import Export" -User JohnD

To assign the " Mailbox Import Export" role to a Windows security group, use the following syntax.
New-ManagementRoleAssignment -Role " Mailbox Import Export" -SecurityGroup Administrators
In addition to the " Mailbox Import Export" role, the user which will actually perform export / import must also be member of the local Administrators group on the Exchange server on which the export operation is taking place.
&emsp;
EXPORTING MAILBOXES TO .PST FILES.
In order to export mailboxes to .PST
1. On an Exchange 2010 mailbox server install Outlook 2010 64-bit
2. Created the folder on your hard drive where mailboxes will be exported, for example c:\pstexport
3. Assign the role and groups membership to the person which will be doing the export
4. Export mailboxes
Here are few common export command samples:
Export a single mailbox for user JohnD to a directory c:\pstexport
Export-Mailbox -Identity JohnD -PstFolderPath c:\pstexport
Export all mailboxes from a designated mailbox database
Get-Mailbox -Database " mailbox database 56774113" -ResultSize Unlimited | Export-Mailbox -PstFolderPath c:\pstexport
Export all mailboxes from a designated server
Get-Mailbox -Server ExchangeMB -ResultSize Unlimited | Export-Mailbox -PstFolderPath c:\pstexport
Export all mailboxes from the entire Exchange organization (from all servers and all databases)
Get-Mailbox -ResultSize Unlimited | Export-Mailbox -PstFolderPath c:\pstexport
Export all mailboxes for users in a specific AD Organizational Unit
Get-Mailbox -OrganizationalUnit Corporate -ResultSize Unlimited | Export-Mailbox -PstFolderPath c:\pstexport
TROUBLESHOOTING MAILBOX EXPORT
Case 1: Export does not work when CAS role is installed together with the mailbox role.
When you try to export a mailbox to a .PST file using the Export-Mailbox PowerShell command you receive the following error:
StatusCode : -2147221219
StatusMessage : Error occurred in the step: Approving object. An unknown error has occurred.
Currently there is a known bug, where export-mailbox and import-mailbox commands will not work on an Exchange Server that has the CAS server role installed together with the Mailbox role.
Workaround 1
In case you have a single or smaller number of mailboxes, you can use Outlook 2010 to export user mailbox to a .PST file. In Outlook 2010 Export functionality can be found under File/Options/Advanced/Export
Workaround 2
Install a separate Exchange machine with only Mailbox role and Outlook 2010 64-bit

Troy Werelius
www.Lucid8.com
 
Status
Not open for further replies.
Top