共用方式為


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

[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: https://msexchangeteam.com/archive/2007/04/13/437745.aspx

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:  https://blogs.technet.com/b/sbs/archive/2009/05/21/cannot-reply-to-old-emails-or-modify-old-calendar-items-after-pst-mail-migration.aspx

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 https://www.microsoft.com/downloads/details.aspx?FamilyID=6be38633-7248-4532-929b-76e9c677e802&displaylang=en *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.

clip_image002

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.

Example:

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.

Example:

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'

Comments

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

  • Anonymous
    January 01, 2003
    Hi, Is there a 2GB size limit on the PST export like there was in exmerge? thanks

  • Anonymous
    January 01, 2003
    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 http://support.microsoft.com/default.aspx?scid=kb;EN-US;832925

  • Anonymous
    January 13, 2009
    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 http://www.petri.co.il/exmerge_and_hebrew_fonts.htm for ExMerge limitations.

  • Anonymous
    January 14, 2009
    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.

  • Anonymous
    January 15, 2009
    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. Perfect.

  • Anonymous
    January 22, 2009
    Hi, if you are bulk importing more than just one *.pst file for one user, how can you specify the setting "dont import duplicates"? Thanks

  • Anonymous
    January 23, 2015
    Really nice article writeup by you.

    But any user looking more information, visit here http://exchangeserver.tumblr.com/post/40168523995

    Thanks

  • Anonymous
    May 09, 2015
    EDB recovery tool is result-oriented tool from inaccessible or corrupt Exchange database and convert EDB to Outlook PST format. Read morehttp://edbrecoverytool.blogspot.com

  • Anonymous
    September 28, 2015
    Here are some quick and simple edb to pst conversion solution to export single as well as multiple mailboxes into PST files in a single move:

    http://www.recover-computerdata.com/edb-pst-converter.html
    https://tipsoutlookexchange.wordpress.com/2012/07/27/quick-edb-to-pst-conversion/

    Good Luck !
    Kelvin

  • Anonymous
    December 01, 2015
    Thanks for the great info. I really loved this. I would like to apprentice at the same time as you amend your web site, how could i subscribe for a blog site?
    For more info on showbox please refer below sites:
    http://showboxandroids.com/showbox-apk/
    http://showboxappandroid.com/
    Latest version of Showbox App download for all android smart phones and tablets. http://movieboxappdownloads.com/ - It’s just 2 MB file you can easily get it on your android device without much trouble. Showbox app was well designed application for android to watch movies and TV shows, Cartoons and many more such things on your smartphone.
    For showbox on iOS (iPhone/iPad), please read below articles:
    http://showboxappk.com/showbox-for-ipad-download/
    http://showboxappk.com/showbox-for-iphone/
    Showbox for PC articles:
    http://showboxandroids.com/showbox-for-pc/
    http://showboxappandroid.com/showbox-for-pc-download/
    http://showboxforpcs.com/
    There are countless for PC clients as it is essentially easy to understand, simple to introduce, gives continuous administration, effectively reasonable. it is accessible at completely free of expense i.e., there will be no establishment charges and after establishment it doesn't charge cash for watching films and recordings. Not simply watching, it likewise offers alternative to download recordings and motion pictures. The accompanying are the strides that are to be taken after to introduce Showbox application on Android. The above all else thing to be done is, go to the Security Settings on your Android telephone, Scroll down and tap on 'Obscure sources'.