Forum Discussion

Dibbly's avatar
Dibbly
Copper Contributor
Nov 07, 2024

Export a users Exchange Online Archive from the admin console.

Hi

Is it possible to export a users Exchange Online Archive from the admin console (i.e. emptying it at the same time).

 

Thanks.

    1. Access the Compliance Center:
      • Go to the Microsoft 365 compliance center.
      • Sign in with your admin credentials.
    2. Create a Content Search:
      • Navigate to Content search under Solutions.
      • Click on New search and provide a name and description for the search.
      • Define the search criteria to include the user’s archive mailbox.
    3. Run the Search:
      • Start the search and wait for it to complete. You can monitor the progress in the Content search section.
    4. Export the Results:
      • Once the search is complete, select the search and click on Export results.
      • Choose the options to export the results to a PST file.
    5. Download the PST File:
      • After the export is ready, download the PST file from the Export tab.
    6. Empty the Archive:
      • To empty the archive, you can use PowerShell to remove the contents. Connect to Exchange Online PowerShell and use the Search-Mailbox cmdlet to delete the items.

    Below the sample PS to delete items from the archive:

     

    Search-Mailbox -Identity "email address removed for privacy reasons" -SearchQuery "Received:01/01/2000..12/31/2024" -DeleteContent -TargetMailbox "email address removed for privacy reasons" -TargetFolder "DeletedItems" -LogLevel Full

     

    • Dibbly's avatar
      Dibbly
      Copper Contributor

      Hi

      I don't seem able to target just the archive folder from the options available

      I run the search, for everything older than 1st May and get the following result, showing it's returning results from 2 mailboxes.

      Going along with that search, I then try exporting, and get the following error message.

      Any ideas?

      Thanks

      D

      • Dibbly's avatar
        Dibbly
        Copper Contributor

        Hi, a little bit more progress.

        The final error message above was caused by using a browser other than Edge.  Switching to Edge, gets rid of the error, and I'm able to download the PST.

        Now, I'm being met with a problem with the Search-Mailbox query, turns out it was deprecated in January, so all I'm getting is "Search-Mailbox : The term 'Search-Mailbox' is not recognized as the name of a cmdlet...." from the V3 EXO PowerShell module.

        I just need a bit more help to simply delete all mails in the users mailbox older than 1st May 2024.  I don't want them going to the Deleted Items folder, I just want them gone and the space freed up.

         

         

  • micheleariis's avatar
    micheleariis
    Steel Contributor

    Hi, no, you need to use the eDiscovery Content Search tool found in Microsoft Purview

    • Dibbly's avatar
      Dibbly
      Copper Contributor

      Is that something standard with 365, or is it something I have to buy?

      • micheleariis's avatar
        micheleariis
        Steel Contributor

        DibblyUsing the eDiscovery (Standard) tool to export the contents of a mailbox archive to Exchange Online is included with Microsoft 365 licenses that include Exchange Online Plan 1 or higher.

Resources