Process to purge emails in office 365

   When an email with malicious content like virus, phising, spam, etc is coming to the company we need to delete those emails from the recipients Inboxes, sometimes in the companies, an employee send an email with incorrect or offensive content, this process applies as well.
Please follow this process:  

1. create the content. (based on https://docs.microsoft.com/en-us/office365/securitycompliance/content-search)             



Click on Content search
Create a new Search
Here we can put the conditions like sender, date range, subject, attachment, etc.
Click on save and run, its important input a name for this search.
In the open option, we can see all the searches saved
Once the search has finished, go to powershell and use the cmdlet New-ComplianceSearchAction
NOTE: to use the compliance module execute this script
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationNameMicrosoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/-Credential $UserCredential-Authentication Basic-AllowRedirection
Import-PSSession $Session -DisableNameChecking
You can validate the report and this task has been completed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s