Forum Discussion
Deleting malicious emails from all O365 mailboxes
i am connecting using the microsoft exchange online powershell module and i am a global admin in our tenant
To use the process VasilMichev mentioned earlier with this doc:
https://docs.microsoft.com/en-us/microsoft-365/compliance/search-for-and-delete-messages-in-your-organization?view=o365-worldwide
You'll need to open Admin Center > Scroll down on the left pane and choose the Security admin center (or go to https://protection.microsoft.com)
From there, you'll need to click on permissions and then assign the permissions mentioned in the doc he provided.
After that you can follow the steps using that method. As mentioned Search-Mailbox is end-of-life soon:
"WARNING: WARNING: On July 1, 2020, the Search-Mailbox cmdlet is being retired and Microsoft Support will no longer provide assistance. See https://go.microsoft.com/fwlink/?linkid=2113221 to learn more.
WARNING: The Search-Mailbox cmdlet returns up to 10000 results per mailbox if a search query is specified. To return more than 10000 results, use the New-MailboxSearch cmdlet or the In-Place eDiscovery & Hold console in the Exchange Administration Center."
- jstump1972Jul 14, 2020Copper Contributor
I have fixed the permissions, i did a simple search for a test email i sent from external to internal and came back with 0 results. stevemorgan