How Can I Verify Exchange Online Compliance Search Results Before Purging Emails?
Asked by
tidy spreadsheet
I have an older PowerShell script that creates an Exchange Online compliance search, starts it, checks its progress, and then exports the results before optionally purging matching messages from the affected mailboxes. The script worked about a year ago, but it recently stopped being able to preview or export search results. It can still create and run the search, and purging appears to remain available, but I cannot inspect the matching messages or confidently verify that the search found the correct items beyond checking the reported item count. Microsoft's current documentation seems to indicate that preview and export capabilities are now limited to on-premises Exchange, while the newer Microsoft Graph and Purview eDiscovery options appear to require E5 licensing. Is there still an Exchange Online-compatible way to preview or export compliance search results with E3 licensing, or are those capabilities no longer available?
Answers
For routine deletions, you may need to combine PowerShell with the Purview web interface. The search and purge operations can still work, but the older preview and export workflow is no longer available in the same way for Exchange Online. Opening the corresponding case or search in Purview before running a destructive action may provide an extra verification step.
Reply to this answer
Microsoft moved much of this functionality from the older Exchange Online APIs to Microsoft Graph and the newer Purview eDiscovery commands. They are not a direct one-for-one replacement, so scripts usually need to be adapted rather than simply updated. The newer workflow and PowerShell examples are a useful starting point, but licensing is an important limitation.
tidy spreadsheet: That seems to be the problem: the newer eDiscovery features appear to require E5, and we only have E3 licenses. Iโll still review the newer workflow in case thereโs an add-on or another supported option I missed.
Reply to this answer
Add your answer
Answers are reviewed before publication.
tidy spreadsheet: The preview is mainly a safety check before allowing a scripted deletion. Iโll look into whether the search or case can be opened directly in the Purview interface so the results can be reviewed there first.