In Focus
No items found.
thinformatics
Back to the blog
Allgemein
Exchange Online
Microsoft 365
Migrations
PowerShell

Tenant-to-Tenant – PST based Exchange Migration automation approach – Part IV

This is the fourth article from a series in which I show a way how to use a pst based approach for a Tenant-to-Tenant Exchange Online migration. In the last article, we prepared the import Job by uploading masses of PST’s to an Azure Container. Today I will share how to import the PST Files from that...

Jakob Schaefer
Jakob Schaefer
Consultant & SME Team GRC[br]Governance, Risk & Compliance
November 30, 2022
5 Minuten
Reading time

This is the fourth article from a series in which I show a way how to use a pst based approach for a Tenant-to-Tenant Exchange Online migration. In the last article, we prepared the import Job by uploading masses of PST’s to an Azure Container. Today I will share how to import the PST Files from that container into the destination mailboxes.

Mapping File

We create a mapping file first. This file should help to map a pst file to a destination mailbox. It could be reviewed and edited before the import is started to be able to work with exceptions etc. If you have used the previous articles to generate and upload the PST Files, then you have a local instance of all pst files which can be used to generate the mapping file. The PST Files were named like the Destination User UPN and the containing Folders were named like the Source User UPN.

You can use PowerShell to create a CSV from this content. I’ve shared the script here: thinBlog/create-pstimportCSV.ps1 at main · thinformatics/thinBlog (github.com). Just edit the variables accordingly and start it. The result is a CSV that contains an entry for every PST in the PSTExportFolder with information about the source and target. Please review the results and add manual entries etc if you want. Be aware that the PST Filename is case-sensitive if you edit the CSV manually.

PST Import

Now it’s getting serious: We will start to import the PST’s from an Azure Container into the mailboxes.

The only supported way to get this done is the method described here: Use network upload to import PST files – Microsoft Purview (compliance) | Microsoft Learn. Alex also showed you how to use it in the article which motivated me to write this series.

Unfortunately, we cannot use this method. Using the supported approach does not allow you to import specific PST Item Content (Source Folder within the PST) into a Target Folder of the destination. Cause all of the PSTs we generated in Part I do not have Inbox etc on the first level, we couldn’t import the content and keep to the original folder structure.

Another problem, I have with the supported way, is that you do not have full control over the used azure storage. E.g. you can not remove PST Files from there, they will be deleted automatically after some time of inactivity.

These two reasons, and my will to get stuff done using automation, lead me to another approach that I’ve also used before in other PST-based migration scenarios. We use the command new-mailboximportrequest which is still available in Exchange Online. While we are to it OnPrem to import from local file shares, you can use it in Exchange Online also to import content from an Azure Storage Container. We’ve prepared this one and uploaded all PST-Files up to there before.

It’s not ideal that this method is not supported, but we’re using the same methods as the supported way. Also there an Azure Blob Container is used and a Mailbox Import Request is started in the Background. So, in general, it seems to work very similarly and from my experience, it’s working very straightforward. But as in every PST Import Scenario, it depends on the quality and integrity of the PST Files.

You find the Script here: thinBlog/import-pstfiles.ps1 at main · thinformatics/thinBlog (github.com)

You need to update the $containerURL and $sasToken URL. You can copy the values from your version of thinBlog/uploadTo-azure.ps1 at main · thinformatics/thinBlog (github.com) in which you’ve entered the container Infos while working on Part III.

Then define a cohort name that helps you to manage the pst import jobs afterward, and change the path to the mapping table accordingly. Maybe you also want to modify the limits $BadItemLimit and $LargeItemLimit.

When you have done that you’re good to go. Let’s have a closer look at some parameters and values of the new-mailboximportrequest command before you run the script:

-Name: The Name of the MailboxImportRequest. The prefix of the job will be the cohort name, followed by the UserPrincipalname and the count of import jobs for this user. The Name and its parts will help you to manage masses of import jobs

-Mailbox: This value defines the destination Mailbox. It uses the mapping file content here to find the related destination

-SourceRootFolder: The result of our PST Exports are PSTs that contain a folder named with the Schema: UserPrincipalName (Archive/Primary)/Top of Information Store. We only want to import the content of this folder to the destination mailbox to recreate the content at the place where the user was used to.

-TargetRootFolder: With this Parameter, we define the destination. All content defined in SourceRootFolder will directly be imported here. Cause we want to recreate the folder structure ‚as-is‘ we set the value to ‚/‘ which stands for the ‚Top of Information Store‘-Folder of the destination Mailbox.

You should assure that the mailbox in the destination has the same language defined for the best possible result.

So, overall the script is connecting to Exchange Online, looping through the mapping table CSV, and starts a new Mailbox Import Request for every named pst. It uses the DestinationUserPrincipalName Value for the Mailbox mapping, the SourceUserPrincipalname for the SourceRootFolder definition, and the Value PSTName for the pst File Identification.

Please try it out with a small number of Test-Mailboxes to be able to react to typos in the Mapping Table or problems with the Folder structure etc.

When the script is finished you can check the jobs and their status:

If you need to dive deeper for error analysis etc you can use these cmdlets to get details about an import job:

Where are we now?

After following the explained steps the user has the content of the PST (= the content of the source tenant mailbox) in its existing mailbox in the destination tenant. The user will be able to find all it’s content.

You could repeat a PST Import Job at every time – also after „refreshing“ the source PST – cause it handles dublettes etc for you if no big changes were made in the meantime in the destination mailbox.

In the last blog of this series, I will show you a way to reapply some of the users mailbox settings: Tenant-to-Tenant – PST based Exchange Migration automation approach – Part V

manage-external-communications-in-teams
Manage external Communications in Teams
September 18, 2025
6 Minuten
Microsoft Teams
Security
Collaboration
Microsoft 365
ansatz-zum-behandeln-des-datenabflusses-bei-der-nutzung-von-m365-fr-sensible-accounts
Isolation von sensiblen Accounts in M365
January 9, 2025
10 Minuten
Identity
Security
Enterprise
Compliance
SSE
GSA
export-archiv-mailbox-content-using-ediscovery
Export Exchange Online Archiv Mailbox content using eDiscovery
September 6, 2024
6 Minuten
Compliance
Microsoft Purview
Export
Exchange Online
Archiving
PowerShell
cloning-entra-cloud-sync-jobs
Cloning Entra Cloud Sync Jobs
May 6, 2024
7 Minuten
Entra ID
PowerShell
Cloud Sync
Hybrid
Microsoft Graph API
entra-cloud-sync-group-provisioning-mappings
Entra Cloud Sync - Group Provisioning
February 21, 2024
6 Minuten
Entra ID
Active Directory
Hybrid
Identity
TIL
do-more-with-less-or-do-less-with-more
“Do more with less” or „Do less with more“?
January 10, 2024
8 Minuten
Allgemein
wie-wandle-ich-meine-sharepoint-liste-in-eine-mini-app
Wie wandle ich meine SharePoint-Liste in eine Mini-APP
July 31, 2023
4 Minuten
Citizen Development
Lists
SharePoint
shared-channels-in-microsoft-teams
Shared Channels in Microsoft Teams: So bringen wir unsere Unternehmensgruppe zusammen
April 24, 2023
7 Minuten
Allgemein
Microsoft 365
User Adoption
Entra ID
Security
Microsoft Teams
datengetriebenes-change-management
Datengetriebenes Change Management? Analyse von Nutzungszahlen und deren Aussagekraft bei der Erfolgsmessung der Digitalisierung und User Adoption
April 13, 2023
8 Minuten
Change Management
Messbarkeit
teams-inventory-implement-membership-requests
Teams Inventory – Implement Membership Requests
March 1, 2023
5 Minuten
Allgemein
Governance
Microsoft 365
Power Automate
Power Platform
SharePoint
Microsoft Teams
how-to-build-a-simple-teams-inventory
How to build a simple Teams Inventory
February 17, 2023
9 Minuten
Logic Apps
update-power-automate-dein-day-summary-flow
Update: Power Automate: Dein „Day Summary“-Flow
February 1, 2023
2 Minuten
Citizen Development
Power Automate
power-automate-dein-day-summary-flow
Power Automate: Dein „Day Summary“-Flow
January 4, 2023
2 Minuten
Citizen Development
Power Automate
tenant-to-tenant-pst-based-exchange-migration-automation-approach-part-v
Tenant-to-Tenant – PST based Exchange Migration automation approach – Part V
December 27, 2022
5 Minuten
Allgemein
Exchange Online
Microsoft 365
Migrations
PowerShell
tenant-to-tenant-pst-based-exchange-migration-automation-approach-part-iv
Tenant-to-Tenant – PST based Exchange Migration automation approach – Part IV
November 30, 2022
5 Minuten
Allgemein
Exchange Online
Microsoft 365
Migrations
PowerShell
tenant-to-tenant-pst-based-exchange-migration-automation-approach-part-iii
Tenant-to-Tenant – PST based Exchange Migration automation approach – Part III
November 25, 2022
4 Minuten
Allgemein
Azure
Exchange Online
Microsoft 365
Migrations
PowerShell
tenant-to-tenant-pst-based-exchange-migration-automation-approach-part-ii
Tenant-to-Tenant – PST based Exchange Migration automation approach – Part II
November 18, 2022
5 Minuten
Allgemein
Compliance
Exchange Online
Microsoft 365
Microsoft Purview
Migrations
PowerShell
tenant-to-tenant-pst-based-exchange-migration-automation-approach-part-i
Tenant-to-Tenant – PST based Exchange Migration automation approach – Part I
November 16, 2022
5 Minuten
Allgemein
Compliance
Exchange Online
Microsoft 365
Microsoft Purview
Migrations
PowerShell
ignite-impressionen-was-ist-neu-in-microsoft-viva
Ignite Impressionen: Was ist neu in Microsoft Viva?
October 28, 2022
5 Minuten
Employee Experience
ignite-impressionen-summary-und-persoenliches-fazit
Ignite Impressionen: Summary und persönliches Fazit zur Session „Microsoft To Do is good for your mental health!“
October 28, 2022
5 Minuten
Allgemein
Microsoft 365
Planner
To Do
ignite-impressionen-microsoft-entra-workload-identities
Ignite Impressionen: Microsoft Entra Workload Identities
October 28, 2022
4 Minuten
Microsoft 365
Entra ID
Conditional Access
Identity
Identity Governance
Identity Protection
ignite-impressionen-microsoft-syntex-die-freundliche-ki-von-nebenan
Ignite Impressionen: Microsoft Syntex – die freundliche KI von nebenan
October 28, 2022
3 Minuten
Allgemein
Microsoft 365
Governance
Information Governance
Power Automate
Power Platform
SharePoint
ignite-impressionen-uebersetzung-mit-ai-builder
Ignite Impressionen: Übersetzung mit AI Builder
October 28, 2022
3 Minuten
Allgemein
Microsoft 365
Citizen Development
Power Automate
Power Platform
SharePoint
how-to-retain-exchange-online-content-an-overview-of-the-different-compliance-options-in-microsoft-365
How to retain Exchange Online content – An overview of the different compliance options in Microsoft 365
September 28, 2022
10 Minuten
Archiving
Compliance
Governance
Retention
azure-ad-guest-governance-automation
Azure AD Guest Governance Automation
August 16, 2022
6 Minuten
Governance
Log Analytics
Logic Apps
assign-teams-app-permission-policies-to-groups
Assign Teams app permission policies to Groups(-Members)
July 1, 2022
8 Minuten
Allgemein
Microsoft 365
Governance
PowerShell
Microsoft Teams
powerautomate-prozente-in-einer-html-tabelle
PowerAutomate: Prozente in einer HTML-Tabelle
May 30, 2022
2 Minuten
Citizen Development
planner-e-mail-report-mit-aufgaben-gruppiert-nach-bucket
Planner E-Mail-Report mit Aufgaben gruppiert nach Bucket
March 31, 2022
3 Minuten
Citizen Development
sharepoint-liste-als-e-mail-uebersicht-mit-personen-feldern-und-odata-meistern
SharePoint-Liste als E-Mail-Übersicht mit Personen-Feldern (und OData meistern)
March 29, 2022
2 Minuten
Citizen Development
Power Automate
use-graph-directory-schema-extensions-for-microsoft-teams-governance
Use Graph Directory Schema Extensions for Microsoft Teams Governance
October 15, 2021
9 Minuten
Microsoft Graph API
teams-invitation-processes-a-comparison
Teams Invitation Processes - A comparison
July 8, 2021
6 Minuten
Access Packages
Compliance
Entitlement Management
Governance
Microsoft Teams
Security
use-more-access-packages
Use more Access Packages!
June 28, 2021
8 Minuten
Access Packages
Identity Governance
Compliance
Governance
Security
Microsoft Teams
microsoft-teams-fulfill-advanced-guest-access-requirements
Microsoft Teams – Fulfill Advanced Guest Access Requirements
December 4, 2020
6 Minuten
Allgemein
Entra ID
Governance
Identity Governance
Microsoft 365
Microsoft Teams
microsoft-365-language-confusion
Microsoft 365 – Language Confusion
September 30, 2020
12 Minuten
Language
another-microsoft-teams-governance-approach-using-azure-ad-identity-governance
Another Microsoft Teams Governance Approach – Using Azure AD Identity Governance
September 18, 2020
21 Minuten
Governance
Identity Governance
Microsoft Teams
planner-migration-tenant-to-tenant
Planner Migration Tenant to Tenant
July 9, 2020
3 Minuten
Migrations
Planner
PowerShell
Tenant to Tenant
flow-instant-raumbuchung
Flow: Instant Raumbuchung
February 25, 2020
2 Minuten
Citizen Development
Power Automate
ai-integrations
ai-solutions
ai-applications
ai-solutions
intranet-solutions
digital-workplace
endpoint-security
security
compliance-regulatorik
security-compliance-zero-trust
plattform-engineering
cloud-plattformen-engineering
endpoint-management-2
workplace
ai-assistants
ai-solutions
cloud-security
security-compliance-zero-trust
cloud-transformation
cloud-strategie-architektur
system-integration
intelligence-automation
business-applications
custom-software
identity-security
security
container-platforms
platform
employee-experience
modern-workplace
collaboration-productivity
modern-workplace
transformation-management
cloud-transformation
application-modernization
cloud-transformation
cloud-governance-und-betriebsmodell
cloud-strategie-architektur
workflow-automation
intelligence-automation
sharepoint-solutions
digital-workplace
security-monitoring
security
collaboration-platforms
workplace
cloud-platforms
platform
virtualization-operations
infrastructure
server-operations
infrastructure
ai-security-compliance
ai-digital-innovation
endpoint-management
modern-workplace
cyber-resillience
security-compliance-zero-trust
identity-access
security-compliance-zero-trust
change-enablement
cloud-transformation
workload-modernization
cloud-transformation
plattformautomatisierung
cloud-plattformen-engineering
hybrid-connectivity
cloud-plattformen-engineering
landing-zones
cloud-plattformen-engineering
business-process-automation
intelligence-automation
microsoft-365-extensions
digital-workplace
apis-integrationen
custom-software
web-applications
custom-software
ai-for-modern-workplace
ai-digital-innovation
aitransformation-adoption
ai-digital-innovation
ai-platforms-engineering
ai-digital-innovation
ai-strategie-und-governance
ai-digital-innovation
workplace-security
modern-workplace
zero-trust
security-compliance-zero-trust
cloud-migration
cloud-transformation
cloud-foundations
cloud-plattformen-engineering
cloud-assesments
cloud-strategie-architektur
hybrid--multi-cloud-strategie
cloud-strategie-architektur
modern-work-adoption
modern-workplace
hybrid--multi-cloud-architektur
cloud-strategie-architektur