SBS 2008 – How to Export and Import Mailboxes To and From PST

SBS 2008 – How to Export and Import Mailboxes To and From PST

  • Comments 9
  • Likes

[Today's post comes to us courtesy of Wayne McIntyre]

As many are already aware, exmerge is no longer supported in Exchange 2007, this has been replaced with the Power Shell cmdlets import-mailbox and export-mailbox introduced in Exchange 2007 SP1 that now handle this functionality.

This post was adapted for SBS from an Exchange team blog post by Ricardo Rosales Guerrero with permission, original Exchange team post can be found here:

Important:  If you use PSTs to migrate mailboxes from one Exchange server to another instead of using the move-mailbox procedure, you will need to read the following blogpost to correct a certain issue with replying to old email:

Export/Import to PST Requirements

In order to export or import mailboxes to PST files the following requirements must be met:

  • Export/Import to PST must be run from a 32 bit client machine with Exchange Management Tools installed (Version Exchange 2007 SP1 or later). The 32bit requirement comes from a dependency with the Outlook client. You can download Exchange 2007 Sp1 32-bit (E2K7SP1EN32.exe) from *You will also need to install PowerShell before you install the management tools.
  • Either Outlook 2003 SP2 or Outlook 2007 must be installed on the client machine.
  • The user running the task must be an Exchange Organization Admin or an Exchange Server Admin on the server where the mailbox to export/import lives.
  • The user running the task must also have full mailbox access to the user mailbox you want to export/import.
  • To use the export-mailbox cmdlet, the source mailbox must reside on either Exchange 2007, Exchange 2003 SP2 (or later), or Exchange 2000 SP3 (or later).
  • To use the import-mailbox cmdlet, the target mailbox must reside on an Exchange 2007 mailbox server.
  • You cannot import or export data to or from a mailbox in a Recovery Storage Group
  • You cannot import or export data to or from a public folder.

Granting Full Mailbox Access

To grant the user running the task full mailbox access to all mailboxes the easiest way to do this is by running the below Power Shell Command:

Get-Mailbox | Add-MailboxPermission –user Username –AccessRight FullAccess –Inheritancetype all

Replace username with the Exchange Organization Admin username.

If you only wish to add permission to one specific user, simply run:

Add-MailboxPermission –Identitiy “MailAlias” –User Username –AccessRight FullAccess –InheritanceType all

Alternatively you can also add full mailbox access through the Exchange Management Console.


Exporting Mailboxes to PST Files

The most basic cmdlet to export a mailbox to a PST file is as follows:

Export-Mailbox –Identity <mailboxUser> -PSTFolderPath <pathToSavePST>

PSTFolderPath must be a full path pointing either to a directory or to a (.pst) file. If a directory is specified a PST file named after the mailbox alias will be used as the target of the export. Note that if the PST file already exists the contents of the mailbox will be merged into it.

To export multiple mailboxes to their respective .pst files at once you can pipe in the identities of those mailboxes to the export task. Notice that when bulk exporting the PSTFolderPath parameter must forcefully point to a directory since one .pst file will be created for each mailbox.


Get-Mailbox -Database “mailbox database” | Export-Mailbox -PSTFolderPath D:\PSTs

Importing mailboxes from PST files

The process for importing mailbox contents from a PST file is quite similar:

Import-Mailbox -Identity <mailboxUser> -PSTFolderPath <PSTFileLocation>

Again, PSTFolderPath must be the full path to the directory where the .pst file lives or to the (.pst) file itself. In the case where PSTFolderPath points to a directory the cmdlet will try to match the mailbox alias with the name of an existing .pst file in the specified directory and import the content of that file.

Just as with the export to PST scenario, when bulk importing mailboxes the PSTFolderPath must forcefully point to a directory and the task logic will try to match mailboxes alias with the .pst file names under that location. If no match is found for a particular mailbox, that mailbox will be skipped.


Get-Mailbox -Database “mailbox database” | Import-Mailbox -PSTFolderPath D:\PSTs

Filtering content in Export/Import to PST

When only specific content is desired in the PST file (or back into the mailbox) a common set of filters can be used to leave out the rest of the messages. Export/Import to PST support the following filters: Locale, StartDate, EndDate, ContentKeywords, SubjectKeywords, AttachmentFileNames, AllContentKeywords, SenderKeywords, and RecipientKeywords.

Example: Import only those messages that were created between 1/1/06 and 12/1/06 and contain the word "review" in the subject and any of the words {"project","alpha"} in the body.

Import-mailbox -Identity ricardr -PSTFolderPath D:\PSTs -StartDate 1/1/06 -EndDate 12/1/06 -SubjectKeywords:'review' -ContentKeywords:'project','alpha'

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Does this procedure take into account locales other than US English? Thise that use special fonts/character sets etc?

    ExMerge had a limited set and I hope that whatever procedure replaces it expands those capabilities.

    See for ExMerge limitations.

  • Hi, Is there a 2GB size limit on the PST export like there was in exmerge?


  • The installation of Exchange Management Tools also requires MMC 3.0, which I couldn't install on my Windows XP Pro SP2 because I have a Swedish installation. So I guess we can add an English OS to the requirements.

  • There is no 2gb size limit, it uses the size limit configured for outlook, which you can configure following this kb, I think the default is 20gb

    832925 How to configure the size limit for both (.pst) and (.ost) files in Outlook 2007 and in Outlook 2003;EN-US;832925

  • So the short version is that Powershell's mailbox import/export cmdlets are missing some serious builtin functionality?

    Develop a cmdlet that only runs on a 32bit OS to control servers that require 64bit? So no more running imports directly from the server?

    Outlook is required to be installed? "take 2"... So no more running imports directly from the server? (assuming installing Outlook on an exchange server is still bad mojo)

    And the best part is that they retired exmerge before they had full mailbox export functionality in Powershell.


  • Hi,

    if you are bulk importing more than just one *.pst file for one user, how can you specify the setting "dont import duplicates"?


  • [Today's post comes to us courtesy of Wayne McIntyre] There are many reasons why a company may need or

  • Really nice article writeup by you.

    But any user looking more information, visit here


  • EDB recovery tool is result-oriented tool from inaccessible or corrupt Exchange database and convert EDB to Outlook PST format. Read more