Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Microsoft 365 / Exporting Microsoft 365 (Exchange Online) Mailbox to PST

June 19, 2023 ExchangeMicrosoft 365PowerShell

Exporting Microsoft 365 (Exchange Online) Mailbox to PST

Let’s look at how to export the contents of a Microsoft 365 (Exchange Online) user’s mailbox to a PST file.

Contents:
  • How to Export Microsoft 365 Mailbox to PST Using Outlook?
  • Exporting Mailbox to PST with Microsoft 365 Compliance Center
  • Export Exchange Online Mailbox to PST with PowerShell

How to Export Microsoft 365 Mailbox to PST Using Outlook?

Users can export their mailboxes to PST files themselves using an Outlook client connected to their Microsoft 365 account.

  1. Open your Outlook client and select File -> Open -> Import/Export;
  2. Click Export to a file in the actions list; export outlook e-mails to pst file
  3. Select an export format: Outlook Data File (.pst);
  4. Then select the folders you want to export from your mailbox to a PST file. In order to export the entire contents of the mailbox, select its root, and check the Include subfolders option; selet mailbox folders to export
  5. Specify a path to the local PST file you want to export your mailbox content to;
  6. You can also set a password to protect the PST file.

Wait for the mailbox export operation to complete.

Exporting Mailbox to PST with Microsoft 365 Compliance Center

A Microsoft 365 (Exchange Online) tenant administrator can export any user mailbox to a PST file. Note that you cannot use the New-MailboxExportRequest cmdlet (available only in the on-premises Exchange Server) to export mailboxes from Exchange Online. The mailbox export feature is available in the graphic eDiscovery Export Tool .

First, assign the eDiscovery Manager role to the account you will use to export:

  1. Sign in to Microsoft 365 compliance center (https://compliance.microsoft.com/);
  2. Go to Permissions, expand Compliance center, and select Roles;
  3. Find the eDiscovery Manager role;
  4. Add your account to eDiscovery Administrator;
    This role is also required to search and delete e-mail messages in Exchange Online mailboxes.

Assing eDiscovery Manager role in Microsoft 365

In addition, you can view and assign roles using PowerShell. Connect to your Microsoft 365 tenant using the Exchange Online PowerShell v2 (EXO V2) module:

Connect-ExchangeOnline

Display a list of users with the Discovery Management role assigned:

Get-ManagementRoleAssignment -Role 'Mailbox Search' -GetEffectiveUsers| where {$_.name -eq "Mailbox Search-Discovery Management"}

To assign the role to a new user, run the command below:

Add-RoleGroupMember 'Discovery Management' -member [email protected]

Then create the Content Search task that will collect the user’s e-mail items.

  1. Open Microsoft 365 Compliance Center -> Solutions -> Content Search -> New Search; Microsoft 365 Compliance center - content search
  2. Enter the task name;
  3. Select Exchange Mailboxes in the Specific locations section and click Choose users, groups, or Teams;
  4. Select the mailboxes you want to export (you may export all mailboxes at once); select microsoft 365 mailboxes
  5. In the next step, you may add extra selection criteria. In our case, we skipped this step.

Wait till the task status changes to Completed.

content search task completed

Now you can export search results to a PST file using the eDiscovery Export Tool. This tool is available as an extension for the Microsoft Edge browser (you may use Meta4 ClickOnce in Chrome and Breez ClickOnce in Firefox).

  1. Open the search results and click Actions -> Export results; export results
  2. Select the following export options:
    Output Options: All items, including ones that have unrecognized format
    Export Exchange Content as: One PST file for each Mailbox export mailbox item to pst file in exchange online
  3. Click Export;
  4. Go to the Export tab in the Content search and click export results;
  5. Click the Download results button; download result
  6. Confirm Microsoft Office 365 eDiscovery Export Tool installation; Install Office 365 eDiscovery Export Tool extension for Microsoft Edge
  7. Copy the export key from the Compliance Search window; copy export key
  8. Paste the key to the eDiscovery Export Tool prompt and specify a path to the local directory you want to save PST files to. Click Start; eDiscovery tool - export to pst
  9. Wait for the utility to download PST files from Microsoft 365. download pst files from microsoft 365

Note that the maximum size of PST files created by the eDiscovery Export Tool is 10 GB by default. If a mailbox size exceeds 10 GB, you will get several PST files. As you know, it is not recommended to make PST files too large. This increases the risk of damage.

You may increase or reduce the size of PST files generated by the eDiscovery Export Tool through the registry.

This limit is different from the attachment size limit in Outlook, Exchange, or Microsoft 365.

The following REG file will reduce the max size of the exported PST file to 8 GB:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange\Client\eDiscovery\ExportTool]
"PstSizeLimitInBytes"="8589934592"

Restart the eDiscovery Export Tool to apply new settings.

Export Exchange Online Mailbox to PST with PowerShell

You can create a search and export task using PowerShell. Connect to M365 Security & Compliance Center:

Connect-IPPSSession

Create a search task:

New-ComplianceSearch -Name "2022-22-11_export_pst" -ExchangeLocation [email protected] | Start-ComplianceSearch

To export data you have found:

New-ComplianceSearchAction 2022-22-11_export_pst -Export -Format Fxstream

New-ComplianceSearchAction poweshell

Wait until the task changes to the Completed status:

Get-ComplianceSearchAction|where {$_.name -eq "2022-22-11_export_pst"}

To get the URL where you can download the PST file (Container URL) and an access key (SAS token), run the command below:

Get-ComplianceSearchAction -IncludeCredential | where {$_.name -eq "2022-22-11_export_pst"}|fl

Get-ComplianceSearchAction - get Container URL and SAS token

1 comment
0
Facebook Twitter Google + Pinterest
previous post
How to Install and Configure Free Hyper-V Server 2019/2016
next post
Using Process Tracking Audit Policy in Windows

Related Reading

Zabbix: How to Get Data from PowerShell Scripts

October 27, 2023

Tracking Printer Usage with Windows Event Viewer Logs

October 19, 2023

PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

October 15, 2023

How to Query and Change Teams User Presence...

October 8, 2023

Installing Language Pack in Windows 10/11 with PowerShell

September 15, 2023

1 comment

Dwayne January 4, 2023 - 10:34 pm

FYI,

the powershell method does not work

Reply

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023
  • How to Use Ansible to Manage Windows Machines

    September 25, 2023
  • Installing Language Pack in Windows 10/11 with PowerShell

    September 15, 2023
  • Configure Email Forwarding for Mailbox on Exchange Server/Microsoft 365

    September 14, 2023
  • How to View and Change BIOS (UEFI) Settings with PowerShell

    September 13, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Outlook Keeps Asking for Password on Windows
  • How to Manually Configure Exchange or Microsoft 365 Account in Outlook 365/2019/2016
  • Moving Exchange Mailboxes to Different Database
  • FAQ: Licensing Microsoft Exchange Server 2019/2016
  • Whitelist Domains and Email Addresses on Exchange Server and Microsoft 365
  • How to Cleanup, Truncate or Move Log Files in Exchange Server 2013/2016/2019?
  • Search and Delete Emails from User Mailboxes on Exchange Server (Microsoft 365) with PowerShell
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top