Exchangemaster GmbH company logo

Exchangemaster GmbH - A Swiss IT Consultancy
Services
References
Partners
Contact
Getting Started
FAQs
Presentations
Articles
Community
Search
Popular
Tell-a-Friend
Follow Me

Follow exchangemaster on Twitter

Who's Online
We have 8 guests online
Syndicate
FAQ 000080 - Exporting mailboxes to .PST files in Exchange 2010 PDF Print E-mail
User Rating: / 260
PoorBest 
Written by Dejan Foro   
May 15, 2010 at 04:26 PM

This article applies to:
Exchange 2010 SP1+
Outlook 2010

For mass export and import operations on mailboxes, the New-MailboxExportRequest and New-ImportMailboxRequest PowerShell commands are used.


In Exchange 2010 these commands are hidden by default. In order to be able to use it, the user must have the Exchange "Mailbox Import Export" role assigned.

 


ASSIGNING NECESSARRY 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 dejan.foro

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.

EXPORTING MAILBOXES TO  .PST FILES.

Here are few common export command samples:
Export a single mailbox for user dejan.foro to a directory c:\pstexport
     Export-Mailbox -Identity dejan.foro -PstFolderPath c:\pstexport

Export all mailboxes from a designated mailbox database
     Get-Mailbox -Database "mailbox database 0255331145" -ResultSize Unlimited | New-MailboxExportRequest -PstFolderPath c:\pstexport

Export all mailboxes from a designated server
     Get-Mailbox -Server exchange02 -ResultSize Unlimited | New-MailboxExportRequest -PstFolderPath c:\pstexport

Export all mailboxes from the entire Exchange organization (from all servers and all databases)
     Get-Mailbox -ResultSize Unlimited | New-MailboxExportRequest -PstFolderPath c:\pstexport

Export all mailboxes for users in a specific AD Organizational Unit
     Get-Mailbox -OrganizationalUnit Marketing -ResultSize Unlimited | New-MailboxExportRequest -PstFolderPath c:\pstexport

 

MONITORING PROGRESS OF THE EXPORT JOBS

 

To list the active export jobs

     Get-MailboxExportRequest

 

To list the active export jobs with progress statistic

     Get-MailboxExportRequest | Get-MailboxExportRequestStatistics

 

 

CLEANING UP AFTER IMPORT OR EXPORT

After the export/import of mailbox content is completed it might be necessary to remove the permissions you have assigned.

To see who has the "Mailbox Import Export" role assigned use the following PowerShell command:
     Get-ManagementRoleAssignment -Role "Mailbox Import Export" | select Name, RoleAssigneeName | Format-Table -Auto

You will get an output similar to this:

    

Name RoleAssigneeName
----  ----------------
Mailbox Import Export-Organization Management-Delegating  Organization Management
Mailbox Import Export-Administrator  Administrator
Mailbox Import Export-Dejan Foro  Dejan Foro

The result in Name column will be used as a parameter for removal. For example to remove user Dejan Foro, following syntax would be used:
     Remove-ManagementRoleAssignment "Mailbox Import Export-Dejan Foro"

 

 

(Note: in the RTM release of Exchange 2010 the names of commands were Export-Mailbox and Import-Mailbox. Those were later renamed, so if you have an Exchange 2010 without a Service Pack installed you should for example use Export-Mailbox instead of New-MailboxExportRequest) .

Last Updated ( Jan 29, 2016 at 04:02 AM )
<Previous   Next>