O'Reilly logo

Microsoft Exchange Server PowerShell Cookbook - Third Edition by Mike Pfeiffer, Jonas Andersson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the logical connector search

The following table outlines the properties that can be used to define an AQS query using a logical connector between two keywords:

Connector

Example

Description

AND

Subject:sales AND Subject:report

This searches for items with both sales and report in the subject line

OR

Subject:sales OR Subject:report

This searches for items with the word sales or report in the subject line

NOT

NOT Body:sales

Body:(NOT sales)

This searches for items without the word sales in the body

Examples

If you want to delete meeting items that have specific content in the body, such as the phrase Social Security Number, use the following commands:

Search-Mailbox -Identity administrator '
-SearchQuery 'Body:"Social ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required