I’ve using a query like this to search a mailbox for malicious emails that we get notified about… and it’s worked for years on the older servers.
Get-mailbox Recipientaddress | search-mailbox –searchquery { from:sender address} –targetmailbox MSGSearchMBXTest –TargetFolder 1-TRG-Remove_onSndr –loglevel full
Running it on newservers from an admin level EPS session it fails, as below
Warning: The search-Mailbix cmdlet returns up to 10000 results per MB if search query is specfied. To return more than 10000 results, use New-MailboxSearch cmdlet or the In-place eDiscovery & hold console in Exchange Admin Center
The input cannot be bound to any parameters for the command either because the command does not take pipeline input or the input properties do not match any of the parameters that take pipeline input
- CategoryInfo : invalidArgument: (MSGSearchMBXTest) [Search-Mailbox]