Hello
It is not that usual that for some reason you may need to “Search and destroy”..
In my early days as a student this was a kind of game mode.. But now one may consider it a need, as an exchange administrator..
One of those days you may receive a call from someone very important saying: “i did a mistake.. and i need your help to correct this ASAP..”
They sent an e-mail that should not have been sent or even worse, it should not have been sent to such a big group of users (in your exchange ( Office365) organization of course)
Well Microsoft gives you a very quick and easy solution to “Search and destroy”.
With eDiscovery you can search for your mail messages all accros the entire organization with a specific subject and delete this item in each mailbox where it was found.
But first you need to be a member of the “Compliance Management” admin role in Exchange Admin Center (EAC)
And second, that role should have the role “Mailbox import and Export” associated.
And second, that role should have the role “Mailbox import and Export” associated.
Once you grant these requirements your are good to go with PowerShell.
The commandlet is pretty simple as you can see bellow:
get-mailbox | Search-Mailbox -SearchQuery 'subject: "super bank mail"' -DeleteContent
I hope that could help you in that call..
See you soon.
David Mota