Office 365 – Performing a PST Migration

A PST Migration is one of the four possible methods of migrating your Exchange infrastructure into Office 365. There are a couple of steps involved, but it is relatively simple, and I detail them here in the order that I find the most straight-forward.

Exporting the PST’s

I do this first as it is the second longest part of the process, the longest being uploading to 365.

Depending on your current permissions, you may need to first assign an administrator permissions to export the mailboxes.

  1. Open the Exchange Management Shell
  2. Run this command
New-ManagementRoleAssignment -Role "Mailbox" Import Export' -User "DOMAIN\USER"
  1. Restart the Exchange Management Shell

Now we can kick of the export. How you create the list of mailboxes to export is up to you. I tend to stick with the Get-Mailbox cmdlet, but you could also use a CSV file or other method. In the Exchange Shell, run the following command

Get-Mailbox | ForEach{New-MailboxExportRequest $_.Alias -FilePath \\Server\Share\$($_.Alias).pst

Keep in mind that the New-MailboxExportRequest does require a UNC path, so something like C:\MailboxExport will NOT work.
You can keep an eye on the export progress with the Get-MailboxExportRequest cmdlet. If you see any that have failed, try exporting just those ones again.

Preparing Exchange Online

This process is much like the first steps in the Exchange Shell. We need to assign the appropriate permissions to an administrator to allow them to import the PST files.

  1. Log into the Office 365 Admin Center and then open the Exchange Admin Center.
  2. Choose Permissions and open the ‘admin roles’ tab.
  3. Add a new role by clicking on the +
  4. Give the role a name e.g. ‘Mailbox Import’
  5. Under ‘Roles’, click the + and add ‘Mailbox Import Export’, and click OK
  6. Under ‘Members’, click the + and select the User(s) that will be performing the import, and click OK.
  7. Save the role.
    new-role

Uploading the PST files

Before we can upload the PST files, we need to get our unique URL and the AZCopy Utility.

  1. In the Office 365 Admin Center, expand the ”Users menu and choose ‘Data Migration’, then click on ‘Upload PST Files’
  2. Click on the small arrow next to the + and choose ‘Upload Email Messages (PST Files)’
  3. Click on ‘Show network upload SAS URL’, and copy the URL for use later. This can take a couple of minutes to display
  4. Click on ‘Download Tool’. This will take you to get AZCopy which will be used for uploading the files. Install AZCopy
  5. Leave everything else the way it is and click ‘Cancel’
    sas-url2

Uploading and Importing the PST’s

Once the PST files are exported, we can upload them with AZCopy.

  1. Open the Azure Storage Command Line
  2. Using your own details, run this command.
AZCopy /Source:C:\PST /Dest:"" /NC:4

Once AZCopy has finished, we need to prepare a mapping file to link each pst file to a mailbox. A sample file can be found here.. Once it is complete, it should look something like this.

mappingfile

The key here is the Target Root Folder. I use a ‘/‘ as it means that the imported items will be in the same place in the new mailbox as they were in the old. You could use ‘/archive‘ and it would create a new folder in the mailbox called archive and import the contents there.

Finally, we need to create an import job. To do this we need to go back to the PST Import page of the Exchange Online Admin Center.

  1. Drop down the + and choose Upload Email Messages (PST)
  2. Tick the I’m done uploading my files and I have access to the mapping file boxes, and click next.
  3. Give the import job a name, click next
  4. Click the + and upload the mapping file. If it is less than 100 lines, it must be verified – so click verify. Then tick the T&C’s box and Finish

Now all you need to do is wait. It can take about 30 minutes to start the import, and the time to complete will depend on the amount of data. You can select the job and hit view details to keep an eye on how it is going and see when it is complete.

3 thoughts on “Office 365 – Performing a PST Migration

  1. This is the great article, and here I want to discuss one more method which is the third-party application. So I recommended the best tool for importing PST to Office 365 Mailbox because there are many software are available and I also suggest you MailsDaddy PST to Office 365 Migration Tool.
    For more details you can visit the given link: http://www.psttooffice365.com/
    But If you want to export the multiple PST files into Exchange Online, then you can visit: https://exchangequery.com/2018/09/18/bulk-import-local-pst-files-to-office-365-mailboxes/

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s