Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 496
  • Last Modified:

Search Exchange Mailbox for e-mails with two or three keywords

Hello,

I need to search a specific user's mailbox for e-mail messages that match a certain criteria.

Specifically, any messages that have the words Georgia and Scope of Practice in them.

I started by using the below powershell, but it only search for messages with the word Georgia in it.

Search-Mailbox -Identity "Username" -SearchQuery "Georgia" -TargetMailbox "Legal Keywords" -TargetFolder "Username-09/21/2011" -LogLevel Full

Is there a way to search for 2 or 3 different keywords and only catch messages that have all 2 or 3 keywords in them?

Thanks!
Brian
0
UALITGUYS
Asked:
UALITGUYS
1 Solution
 
Benjamin MOREAUProject ManagerCommented:
Try to use the "AND" on your query.

For exemple : ... -searchquery "from:someuser@domain.com AND Subject:`Georgia'"
0
 
lucid8Commented:
If you want both Words/Phrases to be present then yes use AND, however is you want results where either word/phrase is present separate keywords by comma i.e. "keyword1", "keyword2", "keyword3". here is a good article to review http://207.46.16.237/en-us/140/ms.exch.ecp.newmailboxsearch.aspx
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Tackle projects and never again get stuck behind a technical roadblock.
Join Now