ExchangeNerd

Powered by Ed Buford and Coffee

Import / Export PST files with Exchange 2010 and 2013

For many reasons we sometimes need to Import or Export all or part of a mailbox to or from a PST.  Before you can Import or Export you’ll need to have permission to actually SEE the commandlets in Exchange.

So start by getting the proper permissions you can give them to a user, in this case to ebuford:

New-ManagementRoleAssignment –Role "Mailbox Import Export" –User ebuford

If you’d rather give permissions to a security group like Administrators you can do that too:

New-ManagementRoleAssignment -Role "Mailbox Import Export" -SecurityGroup Administrators

Once you’ve given rights you’re going to need to log out and then log back in to see the commandlets.

If you’d like to know who has the role assigned to them:

Get-ManagementRoleAssignment -Role "mailbox import export"

Ok so now we have the role let’s get busy!

Let’s say you need to export a full mailbox to a PST here’s how we’ll tackle that. We will need to create an new export request using the New-MailboxExportRequest  commandlet.
Specify the username for the mailbox and then give a full UNC path for the PST file you’re exporting. You can’t use C:\PSTs\ebuford.pst it must be a full UNC path.  So if you’re trying to get to the PSTs folder on the C:\ drive of your exchange server named Exchange2013 then try this:  \\Exchange2013\C$\PSTs\ebuford.pst 

-Mailbox username -FilePath \\files\pstarchive

New-MailboxExportRequest -Mailbox ebuford –FilePath “\\FileServer\PSTs\ebuford.pst”

ok so you started the mailbox export and you want to see how it’s doing. You can get the stats for a single mailbox export like this:

Get-MailboxExportRequestStatistics ebuford\mailboxexport

But what if you have a few exports running at the same time?  Try this:

Get-MailboxExportRequest | Get-MailboxExportRequestStatistics

Ok what about Importing a PST?
Well it’s basically everything we just learned but we’re going to use the NewImportRequest Commandlet.

You can also use the Get-MailboxImportRequest and Get-MailboxImportRequestStatistics.

So far so good – now let’s talk a bit about some of the options for these commands.

Let’s say I’m exporting a pst but I don’t want objects from the deleted items folder. I can use the –ExcludeFolders parameter like this:
New-MailboxExportRequest -Mailbox ebuford  – ExcludeFolders #DeletedItems# –FilePath “\\FileServer\PSTs\ebuford.pst 

Make sure you place ## around the folder

Another option might be to only get the Inbox from a mailbox you can do this just as easily using the –IncludeFolders parameter like this:

New-MailboxExportRequest -Mailbox ebuford  – IncludeFolders #Inbox# –FilePath “\\FileServer\PSTs\ebuford.pst 

Here is a list of well- know folders:

  • Inbox
  • SentItems
  • DeletedItems
  • Calendar
  • Contacts
  • Drafts
  • Journal
  • Tasks
  • Notes
  • JunkEmail
  • CommunicationHistory
  • Voicemail
  • Fax
  • Conflicts
  • SyncIssues
  • LocalFailures
  • ServerFailures

One response to “ Import / Export PST files with Exchange 2010 and 2013 ”

  1. Sergey says:

    Many thanks! (*_*)v

Leave a Reply

Your email address will not be published. Required fields are marked *