The following table outlines the properties that can be used to define an AQS query using a word phrase restriction:
Property |
Examples |
Description |
---|---|---|
|
Searches for items that have an attachment with a specific name such as | |
|
Searches for items where | |
|
Searches for items sent from Bob or Bob Smith. | |
|
Searches for items sent to Bob or Bob Smith. | |
|
Searches for items where Bob was included in the blind carbon copy line. | |
|
Searches for items with the word sales in the subject line. Searches for items with the words "sales" or "meeting" in the subject line. | |
|
Searches for items where the word "financial" appears in the message body. | |
|
Searches for items with Bob Smith in the To, Cc, or Bcc fields. | |
|
Searches for items that have the critical retention tag applied. | |
Financial Report |
Searches for items that contain both "Financial" and "Report" in all word phrase properties. |
When performing a word phrase search, the property names and search terms are case insensitive. If you want an exact match, enclose the search query in double quotes, otherwise the search will default to a prefix match. For example, searching for the term report would match the word reporting unless enclosed in double quotes, indicating an exact search.
If you want to delete all messages in the administrator mailbox where the sender's e-mail address is [email protected],
use the following code:
Search-Mailbox -Identity administrator ` -SearchQuery "from:[email protected]" ` -DeleteContent ` -Force
If you want to create a discovery search based on messages that contain the phrase Employee Salary in every mailbox, use the following code: