Don't deprecate Search-Mailbox in EXO
"Note : In cloud-based environments, the Search-Mailbox cmdlet is being deprecated in favor of New-ComplianceSearch"
Replacing the capability of Search-Mailbox with the new ComplianceSearch and ComplianceSearchActions cmds is a terrible user experience and moves a single step process to a multi-step process with manual intervention. If this functionality is to go away for good, this will severely hinder our ability to execute requests in a timely and efficient manner.
I would argue that these are different use cases and can easily co-exist in the tenant.
O365 is supposed to be in the business of streamlining processes with efficiency, not convoluting them unnecessarily.
Search-Mailbox is the simplest and fastest say to delete emails from a mailbox in Exchange Online.
When they drop this we would have to use four different powershell commands and large wait times in between to do the same thing.
Jason Ahyong commented
For our organization, this is particularly problematic when we have users hit the 100GB recoverableitemsquota and meeting invites/updates would NDR.
We would run Search-Mailbox -Identity [userID] -SearchDumpsterOnly -DeleteContent -force
There doesn't appear to be an equivalent way to empty the mailbox dumpster
Compliance Searches are taking ~15 minutes for us when searching for phishing emails to remove. This isn't good for our phishing mitigation efforts. Doing Compliance Searches is cumbersome and complicated as it stands.
according to article
we can't use -Purge switch to cleanup whole mailbox on acceptable way and time.
A maximum of 10 items per mailbox can be removed at one time. Because the capability to search for and remove messages is intended to be an incident-response tool, this limit helps ensure that messages are quickly removed from mailboxes. This action isn't intended to clean up user mailboxes.
The compliance search fulfills a function for case management and legal. In my opinion, this is not a replacement for search-mailbox. Search-mailbox can be used to move email directly from one mailbox to another while keeping an existing folder structure in a one-liner. Attempting to perform the same thing with the compliance search and .PST export is a much slower and manual process.