I'm curious if anyone has figured out a truly efficient way of running a 'search and destroy' for spam/phishing messages in a 75,000+ mailbox, Exchange Online (Office 365) environment.
In Powershell, the search-mailbox cmdlet is limited to 10,000 items per mailbox. This isn't a problem if you pipe 'get-mailbox -ResultSize unlimited' into it. However, retrieving 75,000+ mailboxes will end up consuming all 16GB of my computer's memory.
Currently, I run a message trace for the target message and then foreach(recipient){search-mailbox $targetmessage -delete} (very abbreviated)
This method works great but the message-trace cmdlet has a 5,000 result limit so if the target message has been distributed to more than 5,000 mailboxes, some messages will go un-checked.
My next idea was to try and break the mailboxes down into smaller groups and...