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

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

In Part I of this series (Tenant-to-Tenant – PST Exchange Migration automation approach – Part I) I’ve described how to prepare a PST-based migration by exporting mailbox settings into XML files. The next task is to export PST’s from the source. In our case, I’m talking about an Exchange Tenant-to-Tenant...

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

In Part I of this series (Tenant-to-Tenant – PST Exchange Migration automation approach – Part I) I’ve described how to prepare a PST-based migration by exporting mailbox settings into XML files.

The next task is to export PST’s from the source. In our case, I’m talking about an Exchange Tenant-to-Tenant migration. So we need to export the PST’s from Exchange Online. In the good old OnPrem days we’ve used New-MailboxExportRequest to get this job done in bulk. In Exchange Online this is not possible anymore.

But we have eDiscovery. You can not only use eDiscovery to find and delete masses of emails within your environment (Typically these are some unintentionally sent mails from managers or frustrated co-workers 🙂 ), but you can also export the content of mailboxes to PST Files.

I was used to the fact that an eDiscovery results in a plain pst without the folder structure of the related user mailbox but on the occasion of Alexander Holmesets Blog and the following discussion on Twitter I tried it again and was surprised that it really results in a PST which will not only contain the mails, contacts, calendars, etc, but also the original folder structure.

ICYMI:

Is it possible to do an Exchange tenant to tenant migration for free? Yes, it is! Take a look at these Microsoft methods I used to accomplish this.#PowerShell #ExchangeOnlinehttps://t.co/hjNda3ikR2

— Alexander Holmeset (@AlexHolmeset) October 6, 2022

So, the result will be nearly the same as the one we get when we use new-mailboxexportrequest on-prem!

Knowing that I’ve tried to automate the export overall, but unfortunately I failed to get this done 100%. But at least I was able to bring it to ~50% – I will come back to that later.

First, assure that you have the right to create an eDiscovery Case and that you were allowed to export the results. You need the eDiscovery Manager Role to get the following done. Alex explained in his blog how to assign that and here is a link to the official docs article: Assign eDiscovery permissions in the Microsoft Purview compliance portal – Microsoft Purview (compliance) | Microsoft Learn

Afterward, you can go on and create an eDiscovery Case. Within the Case you will create a search in which you define what you searching for and where (which mailboxes). Finally, you will define a Search Action to be able to export the Search results. <- That’s the automated part.

You can use these cmdlets to create the Search and prepare the Download:

thinBlog/CreateAndRunExportSearch.ps1 at main · thinformatics/thinBlog (github.com)

Just update the vars in lines 1-4 accordingly. in line 8 you connect to the Compliance & Security Center of the source tenant and wait for the search to complete. To run these cmdlets you need the Exchange Online Management module which still contains the commands for the compliance stuff.

When you processed the cmdlets above, log in to the compliance Center in the Purview portal: eDiscovery (Standard) – Microsoft Purview. In ‚Searches‘ you will find the search you just created via PS. If you navigate to the Tab ‚Exports‘, you can download the search action results (when the export is completed). Just copy the Export Key to your clipboard, click on Download Results and use the following self-installing assistant to download the results. <- That’s the part I was not able to automate.

What you have now, is a collection of PSTs for all mailboxes you defined in the Search

If you open one of the PSTs you will see a folder named like the primary SMTP Address, followed by a suffix that identifies if it’s the primary or the archive mailbox. Within that folder, you have the hidden folders which contain deletions, etc., and the Folder ‚Top of Information Store‘ which contains the regular mailbox content with the Inbox, Calendar, ….

Where are we now?

In this blog post, I’ve described a way how to semi-automate the PST Export. You can use the shared PowerShell cmdlets to cut and prepare your export tranches (by the way: the eDiscovery Limits allow you to download up to 100 000 exports in one Search).

You can also restart searches at any time to get the latest version of the source mailbox content and prepare the best possible result before migrating them anywhere.

With the Mailbox Settings, we collected in the last article and with the content exports we created now, we finished the tasks we had to do in the source tenant. Depending on your project timeline, requirements, and project planning (cohorts vs big bang) you can now move your mail domain to the other tenant.

In the next part of this series, I will show you an automated way how to upload the PST files to a repository from which we will import them into the mailbox.

Part III (Upload PST’s to Azure): Tenant-to-Tenant – PST based Exchange Migration automation approach – Part III

Outbreak automated PST Export download

As described above I wasn’t able to export the search action results automatically to pst’s. Why not I want to share here. Maybe somebody who reads this has some insights that could help to get this done completely.

As you see in the script I’ve shared above I am able to export the Container URL and the SAS token using the -IncludeCredentials Parameter within the New-ComplianceSearchAction command. That returns the key. With that, I’m able to download the Export Search Action Results in General to the local file system using azcopy.

I’ve googled a bit about it and opened threads od Twitter and Mastodon, but doesn’t find any process documentation of it. Because the additional value in this migration scenario is not really high, I didn’t dig further.

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