Exporting email from Exchange Online

One question that comes up fairly often is “how do I get my email out of Exchange Online?” As with many questions about Office 365, the answer can be a bit less straightforward than you might think.

There are a couple of different options for getting your data out of Exchange Online. The first, and simplest answer is to move your mailbox to an on-premises Exchange server in a hybrid mailbox move. Exchange Online supports hybrid mailbox moves in both directions, and you’re free to move your mailbox back and forth between your on-premises Exchange servers and Exchange Online at any time. Of course doing so requires that you have and maintain an on-premises Exchange organization in a hybrid configuration. For some companies, that might be impractical or infeasible. So how do you get your email out of Exchange Online if you don’t have an on-premises Exchange organization?

If you want to move the email in an on-premises Exchange server to a pst, you can add your account to the mailbox import/export role group, and run the New-MailboxExportRequest commandlet. You won’t have to try too many times before you figure out that the New-MailboxExportRequest commandlet is not available in Exchange Online. I’ve asked everyone at Microsoft who will listen to me, and no one can give me a good answer as to why that commandlet is not available. I’ve heard some bad answers, like that commandlet requires Outlook so it won’t work through Remote PowerShell or that commandlet requires a local URL for the output path so it won’t work through Remote PowerShell. Both of those explanations are wrong for several reasons.

Whatever the reason that New-MailboxExportarequest is not available in Exchange Online, we have to deal with the solution we have not the one we want. We have two different options to export our email to a pst. Of course we can use Outlook. The import/export wizard in Outlook will allow you to export email from an Exchange Online mailbox, but that is not exactly an easy solution.

The solution we’re here to talk about today is the eDiscovery tool built into Exchange Online. When you need to export email from directly from Exchange Online to a pst file, here are the steps to follow…

Add your account to the Discovery Management role

Add-RoleGroupMember -Identity “Discovery Management” -Member you

Create an eDiscovery search mailbox

New-Mailbox SearchResults -Discovery -UserPrincipalName SearchResults@contoso.com

Create the eDiscovery search

New-MailboxSearch “Export bob to pst” -SourceMailboxes “Bob” -TargetMailbox “Search Results”’ -MessageTypes Email -IncludeUnsearchableItems -LogLevel Full

Use EAC to export search results

  1. Go to Compliance management > In-place eDiscovery and Hold
  2. In the list view, select the “Export bob to pst” search, and then click Export to a PST file

…and you’ll be on your way to exporting you email to a pst. Not the most direct method, but it’ll get your email out and I guess that’ll have to do until Microsoft can be convinced to put the New-MailboxExportRequest functionality into Exchange Online.