Using Export-Mailbox Powershell Command

Import/Export-Mailbox powershell cmdlets have replaced Exmerge. Below are various ways to use export-mailbox command to export to PST file.
note: you will need these rights to perform these tasks
  • Exchange Server Administrators role and local Administrators group for the source server and the target server
  • Full access to the source and target mailboxes
1. export contacts folder from a user's mailbox
Export-Mailbox -Id obitest11 -IncludeFolders '\contacts' -PSTFolderPath C:\pstfiles\obitest11.pst
2. export sent items from a user's mailbox
Export-Mailbox -Id obitest11 -IncludeFolders '\sent items' -PSTFolderPath C:\pstfiles\obitest11.pst
3. Export data received between june 14th, 2007 through 6/14/2008
Export-Mailbox -Id obitest11 -StartDate "06/14/07" -EndDate "06/14/08" -PSTFolderPath C:\PSTFiles\obitest11.pst
4. To use filters to specify which items in the source mailbox to include in the export, run the following command:
Export-Mailbox -Identity obitest11 -TargetMailbox ExportMailbox -TargetFolder MyData -ContentKeywords "merger" -AttachmentFilenames "*orgchart*" -StartDate "03/01/2006 12:01:00" -RecipientKeywords tony@domain.edu
5. Use this export-mailbox command to archive deleted items to pst and delete the "deleted items folder" contents on server mailbox
Export-Mailbox -Id obitest11 -IncludeFolders '\deleted items' -PSTFolderPath C:\pstfiles\obitest11.pst -DeleteContent
6. Export entire mailbox to PST file
Export-Mailbox -id obitest11 -PSTFolderPath C:\pstfiles\obitest11.pst
7. Import entire mailbox to PST file
Import-Mailbox -id obitest11 -PSTFolderPath C:\pstfiles\obitest11.pst