A unified data governance solution that helps manage, protect, and discover data across your organization
To include all mailbox types across the tenant (user, shared, resource, and Microsoft 365 group mailboxes) in your Content Search, you should target all Exchange mailboxes instead of using a CSV list.
You can do this by using:
-ExchangeLocation All
Example:
$searchName = "test-search"
After confirming the search results, you can proceed with the purge:
New-ComplianceSearchAction -SearchName $searchName -Purge -PurgeType HardDelete
Important Considerations:
- Always review search results before running purge
- Mailboxes under retention or litigation hold may preserve deleted items
- Microsoft 365 group mailboxes are included when using
All - Items are permanently removed after Managed Folder Assistant processing
- Teams messages returned by the search query are not deleted by purge
Hope this helps. Please let me know if you have any questions.