365 Mail Import/Export, for migrating tenancies

Modified on Fri, 21 Aug, 2020 at 2:59 PM

Mail Export (365 – 365)

Software needed for export:

                https://www.manageengine.com/products/free-windows-active-directory-tools/export-and-import-mailbox-pst-tool.html (Exports Mailboxes)

https://www.microsoft.com/en-gb/download/details.aspx?id=30653 (.Net 4.5)

https://www.microsoft.com/en-gb/download/details.aspx?id=42022 (Exchange Web Services)

https://www.microsoft.com/en-gb/download/details.aspx?id=42040 (MAPI Client)

https://cmdletpswmodule.blob.core.windows.net/exopsmodule/Microsoft.Online.CSE.PSModule.Client.application (Exchange PowerShell Module - Open in IE or Edge)

 

Software Needed for import:

https://aka.ms/downloadazcopy (AzCopy, Move PST to Azure Blob)

https://go.microsoft.com/fwlink/p/?LinkId=544717 (CSV Mapping File)

Pre-Export

  1. To avoid the cut over time for the users, Add the OU’s to AD Sync and sync the accounts up now.
  2. Assign the Licenses so that the mailboxes can build
  3. Assign the custom Attribute for the Address book Policy (Needed later)

 

Export Mailboxes

  1. In the Source Tenancy go to https://admin.microsoft.com/AdminPortal/Home#/reportsUsage/MailboxUsage and set the filter to storage :
  2. Install the Software on a device with enough storage to hold the mailboxes
  3. Open the PST migration tool
  4. Add Migration account to 365 as a Global Administrator (Needs to have and exchange License and a.onmicrosoft.com UPN)
  5. Open Exchange PowerShell

 

  1. Edit the account in this command and run it in the PowerShell (Make sure the mailbox has created for the migration account) Get-Mailbox -ResultSize unlimited | Add-MailboxPermission -User "MigrationAccount@***.onmicrosoft.com" -AccessRights FullAccess -InheritanceType all 

 

  1. Edit the CSV Path and run this command Get-Mailbox -ResultSize Unlimited | Select UserPrincipalName,DisplayName |Export-csv -Path C:\Temp\Export.csv 

 

  1. Wait a few hours for permissions to propagate
  2. In PST export add the migration account: 
  3. Under “Export PST” Select All mailboxes and the storage locations for the PST (untick Discovery Search Mailbox and the Migration account) Select User Principal Name for the File Name
  4. On the next page click Export. This will export the PSTs of the accounts to the Local Storage
  5. When the Export is complete delete the migration account from Office 365

 

IMPORT Mailboxes

  1. In the Exchange Admin (Central Tenancy) Add your user to Export/Import PST Mailboxes:
  2. Wait for up to 24 hours for the permissions to update and then go to https://protection.office.com/import
  3. Create new Import Job
  4. Click through the wizard (Name is lowercase and no spaces & chose Upload your data)
  5. Copy SAS URL to a text document for later
  6. Open Azure copy and use this command (azcopy.exe /source:”Location of downloaded PSTs” /Dest:”SAS URL” /V:”Log File Location” /Y) to copy the PSTs to the Azure Blob
  7. Edit the CSV Location and the ABP to the school code Get-Mailbox -Filter {(UserPrincipalName -like "*onmicrosoft.com") -and (CustomAttribute15 -eq "AVA_ABP")} | Select UserPrincipalName,GUID | export-csv C:\Temp\365.csv 
  8. Copy The user Principal Name from the Export csv in step 7 of the export to the NAME column of the mapping document (you need to add .PST to the end of all CONCATENATE will work the best – Copy the contents of the column and paste over the top selecting “Paste Values”
  9. Take the GUID from the export in Step 7 and match the UPN to the GUID in the Mapping CSV
  10. Set the “workload” column to Exchange for all mailboxes and Is Archive to False. The Target Root Folder is /
  11. Upload the CSV to the PST import in the compliance centre and Validate it
  12. Office will now validate the files; this may take some time (365 will email you when it is done)
  13. When done click “Ready to Import to Office 365”
  14. Select NO for data Filtering and click import data
  15. The import will take ages
  16. When the import is done all the mail has migrated

 

Important Note – All mailbox permissions will need to be recreated in the new tenant 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article