Is there a way to delete more than 10 items at a time from the RecoverableItems folder?

chrisGreeson 6 Reputation points
2020-08-23T20:43:39.087+00:00

Following this article: https://learn.microsoft.com/en-us/microsoft-365/compliance/delete-items-in-the-recoverable-items-folder-of-mailboxes-on-hold?view=o365-worldwide and on Step 5 it says to "....delete items in the Recoverable Items folder by using the New-ComplianceSearch and New-ComplianceSearchAction cmdlets. To Do this see Search for and delete email messages"

According to the article, "A maximum of 10 items per mailbox can be removed at one time."

I currently have users with 100GB of emails stuck in RecoverableItems folders and have to write a script to delete them 10 at a time with the New-ComplianceSearchAction cmdlet. Is there not any way around this or is there a better way to have emails removed from the mailbox?

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,347 questions
{count} vote

2 answers

Sort by: Most helpful
  1. Yuki Sun-MSFT 40,856 Reputation points
    2020-08-24T03:06:58.367+00:00

    From the articles you referenced, do you mean you are running Exchange Online and these user mailboxes are placed on hold or have single item recovery enabled?

    If this describes your situation, considering that the recoverable items folder play an essitial role in preserving data for mailboxes on hold, normally it's recommended to use the New-ComplianceSearchAction cmdlet which has a limit of 10 items at one time to lower the potential impact of mistakes.

    If you insist on deleting more than 10 items at a time, you can use the Search-Mailbox cmdlet instead. The example below searchs and deletes the items received in the last three months from user1's recoverable items folder:

    Search-Mailbox -Identity user1 -SearchDumpsterOnly -SearchQuery {Received:"2020/5/22..2020/8/24"} -EstimateResultOnly  
    Search-Mailbox -Identity user1 -SearchDumpsterOnly -SearchQuery {Received:"2020/5/22..2020/8/24"} -DeleteContent  
    

    19774-search-mailbox.png

    For more information, you may refer to this article: Clean up or delete items from the Recoverable Items folder in Exchange Online

    Note: I tested in my Exchange Online lab using the scripts above and it worked on my end. But please be aware that the Search-Mailbox cmdlet is being retired from Exchange Online and Microsoft Support will no longer provide assistance (see the Warning message in the screenshot above).

    Additionally, an alternative I can think of is to grant your account access to the mailbox in question and setup a new Outlook profile for the task, then you can use the MFCMAPI tool to proceed with deletion of the contents of the Recoverable items folder:

    1. Open MFCMAPI, select Session > Logon…, choose the newly created Outlook profile and click “OK”.
    2. In order to view the Recoverable Items folder, click Tools > Options, make sure the following two checkboxes are selected:
      19784-1.png
    3. Double click the target mailbox in the list, expand the Root Container tree to locate the “Recoverable Items” folder.
    4. Depending on whether the user has purged the item and whether the mailbox was placed on hold, the stuck items might be in different subfolders under the “Recoverable Items” folder. So you may go through the subfolders such as Deletions (corresponding with the Recoverable items folder visible in Outlook), Purges and DiscoveryHolds by double clicking them.
    5. To remove items from these subfolders, you can use Ctrl or Shift key to select multiple items, then go to Actions > Delete message, choose the Hard Delete option and click OK:
      19656-2.png
      Here's an article for your reference: Delete items in the Recoverable Items folder in Exchange Online.
      Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    If the response is helpful, please click "Accept Answer" and upvote it.


  2. UnionKB 0 Reputation points
    2023-02-06T01:21:24.2066667+00:00

    It may be inappropriate to write here about a method that does not use Exchange Server, but this is the only Google search result I could find, so I will write about it.

    You can delete all the files from the Outlook address book of the offline Office application in one step. However, it takes time to reflect them in Outlook on the web. In my case it took about 30 minutes for 800 addresses. If there are more, it might take a day.

    0 comments No comments