Using Exchange Management Shell to Export mailbox data in Exchange Server 2007
The export mailbox feature in Exchange 2007 replaces Exmerge, a handy tool in legacy versions of Exchange.
Things to remember:
1. Exchange Management Console, the GUI to administer exchange 2007 cannot be used to export mailbox data, we need to use the shell.
2. Public folders are not supported for export mailbox
3. Cross forest export mailbox is not possible.
Permissions required for export mailbox:
In order to grant full access to a mailbox, use “Add-MailboxPermission” cmdlet and specify FullAccess for the AccessRights parameter.
Guru- The admin account to be granted full mailbox rights
User A- Mailbox from which data to be exported
Run these commands in Exchange Management Shell:
Add-MailboxPermission -Identity UserA -User Guru -AccessRights FullAccess
Add-MailboxPermission -Identity UserB -User Guru -AccessRights FullAccess
2. The account Guru should be granted Exchange Server Administrators level permissions and should have Local Administrator rights for the source server as well as target server
3. For legacy Exchange 2003 or Exchange 2000 mailbox, the account Guru must have the Exchange Administrator role for the administrative group in which the server resides.
To export data from a *.pst file, run the Export-Mailbox cmdlet from a 32-bit computer that has the following installed:
a. The 32-bit version of the Exchange management tools
b. Outlook 2003 Service Pack 2 (SP2) or Outlook 2007
4. Exchange 2007 management tools 32-bit download
5. The target mailbox specified must exist before you run the command, to export data to a folder in another mailbox
The “Export-Mailbox” cmdlet exports all message types, including messages, calendar items, contacts, distribution lists, journal entries, tasks, notes, and documents. By default, the “Export-Mailbox” cmdlet exports all empty folders, special folders, and subfolders to the target location.
To export data to a *.pst file- Mailbox copy.pst to a location C:\Export Mailbox, run the following command:
“Export-Mailbox -Identity UserA@domain.com -PSTFolderPath C:\Export Mailbox\Mailbox copy.pst
To export data that was received between February 2, 2005, and February 15, 2005, to a .pst file, run the following command:
Export-Mailbox -Id UserA@domain.com -StartDate “02/02/05″ -EndDate “02/15/05″ -PSTFolderPath C:\Export Mailbox\Mailbox copy.pst
To export only data from the Deleted Items folder, run the following command:
Export-Mailbox -Id UserA -IncludeFolders ‘\Deleted Items’ -TargetFolder ‘UserA Deleted Items’ –TargetMailbox Export Mailbox
To import a *.pst to UserA mailbox, run the following command:
Import-Mailbox -Identity UserA@domain.com -PSTFolderPath C:\Export Mailbox\Mailbox copy.pst