In Focus
No items found.
thinformatics
Back to the blog
Compliance
Microsoft Purview
Export
Exchange Online
Archiving
PowerShell

Export Exchange Online Archiv Mailbox content using eDiscovery

In this post, I want to share a method with you that can be used to export the content of Exchange Online Archive Mailboxes. We’re using PowerShell and the Compliance Portal to export the content. I will lead you through the process of generating PST Files which will contain the content of archive mailboxes...

Jakob Schaefer
Jakob Schaefer
Consultant & SME Team GRC[br]Governance, Risk & Compliance
September 6, 2024
6 Minuten
Reading time

In this post, I want to share a method with you that can be used to export the content of Exchange Online Archive Mailboxes. We’re using PowerShell and the Compliance Portal to export the content. I will lead you through the process of generating PST Files which will contain the content of archive mailboxes.

Exchange Online Archive Mailboxes

Exchange Online Archive Mailboxes are a kind of secondary mailbox storage. They can be enabled for licensed Exchange Online Mailboxes. Reasons why you have this kind of mailbox could be

you want to clean up your mailbox but not throw away the old stuff

you need to have more than 100GB in a mailbox

you thought that these mailboxes could help you to fulfill your regulatory requirements regarding retention

Other Names for this kind of secondary storage are In-Situ or In-Place Archive.

What’s the Problem

There can be multiple Reasons why you want to get rid of all or single Mailbox Archives. Here are some:

To use an Exchange Mailbox you need to have at least an Exchange Online Plan 1. This is also relevant for shared mailboxes. You might have changed some mailboxes from a user mailbox to a shared mailbox and want to eliminate the license requirement

To keep your mailbox clean an archive mailbox can be a tool. But for some users (I am one of these) secondary storage makes it harder to keep the overview. You might want to reduce your mailboxes to one.

Not every client can work with archive mailboxes (Like Outlook mobile). You might have the requirement to access mailbox content from this affected mailbox

Unfortunately, there is no simple way out. You can hand over the processing to the user and ask him to move the content over to his primary mailbox using Outlook. In single cases, this could be a feasible solution.

A more “enterprisish” solution to move masses of items over to your primary mailbox is using EWS. Michel de Rooij shared this article which shows how to use EWS to move the content: Unarchiving Mailbox Items | EighTwOne (821). This works in general, I already used it in times when I had to operate Exchange Servers. EWS is not fast, depends on client software, and is discontinued in Exchange Online (Retirement of Exchange Web Services in Exchange Online - Microsoft Community Hub). Furthermore, I can’t get used to EWS, but I know how to use compliance tools and PowerShell. eDiscovery, here we go!

Why use eDiscovery

Microsoft Purview eDiscovery is designed to fulfill requirements in legal cases. You can create cases and assign case roles to discover relevant content in multiple Microsoft 365 services. Discovered Data can be handled with different actions like retaining or deletion.

In the past, Exchange Admins used Exchange PowerShell cmdlets like search-mailbox for export tasks like the one I’m describing here. Microsoft has meanwhile disabled the cmdlet in Exchange Online for reasons. Apart from backup methods and single-item export functions, the eDiscovery Tools are the most native way to export large amounts of data from your Tenant.

The eDiscovery Method to export Archive content

To be able to import stuff to your primary mailbox, you need to export it first. That’s what this article is about. The result will be PST-Files for every targeted Archive Mailbox which will contain the content of the related archive mailbox.

Before you start you should ensure that no new content is generated in your archive mailboxes. So you need to inform your users and double-check if there are classic Message Retention Policies (MRM) Policies that create new stuff in the archive mailboxes.

Furthermore, you need an admin account that has an exchange admin and compliance manager role assigned to be able to create the search and export the results.

Next, go on and identify every identity that has an archive mailbox that you want to export and write them down in a .file

You use the CSV to feed the PowerShell script I published here: thinBlog/ArchiveExport/ExportArchiveMailboxContent.ps1 at main · thinformatics/thinBlog (github.com). Now you grab the script and start processing, or you invest a few more minutes to read my explanations about the most relevant parts of the script.

In the first lines, we’re using the ExchangeOnlineManagement Tool to connect against Exchange Online and the Purview Backend. Additionally, we define the path to the CSV and names for the eDiscovery Case that will be used to search and export the relevant content.

The Switch “OneSearchForAll“ determines whether all content is handled in one search, or if a search will be created for every recipient. The export result will be the same in both cases (One PST per User). But if you want to refine the content for specific mailboxes, you should create single searches and set the switch to false. Try it out and choose the method that fits your requirements.

The function “get-ArchiveMailboxFolderIDs“ is a core component of this script. It’s used to crawl an archive mailbox and generate a list of folder IDs. This approach is needed cause we can’t scope an eDiscovery search to archive mailboxes only. So we need to define exactly in which folders we want to search for content. The parameter excludeSystemFolders can be used to exclude Folders that are mostly not relevant for the end users. Kudos again to Tony Redmond for sharing the way to convert the Exchange Folder IDs to the format we need in the eDiscovery query (How to Use a Targeted Collection in a Microsoft 365 Content Search (practical365.com)).

The last part I want to explain is the puzzle piece where we create the eDiscovery search. In this example, we generate one search for every named archive mailbox in the eDiscovery case we’ve deployed before. The Search contains a ContentMatchQuery that’s generated by the function I’ve described above. This query contains all the folderID’s of the mailbox folders that should be exported The search will be started after creation.

When the script is finished, the results are one or more searches in an eDiscovery case. When the search is completed you can start the export of the results. The following screenshot collection will show you what the result looks like in the purview center and how you can start the download of the PST files.

When the export and export-download is finished you will find PST’s for every user in the download location. This picture shows you how it should look like.

You exported the archive mailbox content now. Depending on your use case you can now disable the archive mailboxes &/ import the archive content into the primary mailbox. If you have to import masses of pst’s into masses of mailboxes, you might want to read my series about a PST-based migration approach. It contains all the stuff you need to automate the import. Part 3 should be a good start to the task of importing it: Tenant-to-Tenant – PST based Exchange Migration automation approach – Part III — thinformatics.

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