looks like it does not work with compound conditional statements. I would break it down into single queries.
On Wed, Jan 13, 2016 at 2:00 PM, Sean Martin <[email protected]> wrote: > Good morning/afternoon, > > I've been tasked with a broad discovery effort so I'm attempting to put > together an appropriate search query using the Search-mailbox command. The > requirements are: > > 1) Message includes any of a number of words or phrases > 2) Message was delivered by any of a number of domains > 3) Message was sent to a specific domain > > Here's the syntax I came up with, which executes, but doesn't appear to > return content matching the search criteria. FYI: I'm testing with a single > mailbox, but the command will ultimately be run against all mailboxes. > > Search-Mailbox -identity "mailbox" -searchquery '"word1" or "word2" or > "phrase 1" or " > phrase 2" AND From:"*@domain1.com" or "*@domain2.com" AND To:"*@ > domain3.com"' -targetmailbox "targetmailbox" -targetfolder "folder" > -loglevel full > > It appears to pull e-mails matching the content query, but not specific to > the sender(s) or recipient specified. > > Is what I'm trying to accomplish possible? Any help would be appreciated. > > - Sean > > > -- T. Todd Lemmiksoo
