Content Search and Email Purge
Description
Content Search and Email Purge
Resolution
- Open M365 portal and go to the compliance center/Microsoft Purview. https://compliance.microsoft.com
- Go to "Permissions" underneath "Roles & Scopes"
- Under Microsoft Purview click Roles
- Click on eDiscovery Manager
- Add your admin account as an "eDiscovery Admin"
- Sign out and back in for this to take effect
- Go back to Microsoft Purview
- Go to the "Content Search" tab
- Create a new search
- Give a name
- Select locations you wish to search. Exchange mailboxes and public folders are recommended. For Exchange mailboxes, you can select specific users or groups.
- Add the conditions and keywords you wish to search by.
- Review and click "Submit"
- Once back on the content search page, refresh until the search status is completed. One the search and click "Review sample". This will allow you to validate the emails that were found in the search. If purging emails, validate there is not anything in here you do not wish to delete.
- Open PowerShell
- Install-Module -Name ExchangeOnlineManagement (this should only be needed the first time)
- Import-Module ExchangeOnlineManagement
- If you get an error message stating "cannot be loaded because running scripts is disabled on this system."
- Run the command without quotes "Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass"
- Connect-IPPSSession -UserPrincipalName qp_365_admin@customerdomain.com - This will bring up an interactive login prompt.
- Get-ComplianceSearch - This should bring up a list of searches, verify the one you created is in the list.
- New-ComplianceSearchAction -SearchName "test1" -Purge -PurgeType SoftDelete then hit "A"" - This will soft delete everything in the search
- To see the progress of the search run: Get-ComplianceSearchAction Status will show completed when done.
- Disconnect-ExchangeOnline to end the session
No Comments