Using the message type search
The following table outlines the properties that can be used to define an AQS query using a message type restriction:
Property |
Example |
Description |
---|---|---|
|
|
Searches all email items Searches all meeting items Searches all task items Searches all note items Searches all doc items Searches all journal items Searches all contact items Searches all im items |
Examples
If you want to delete all the contacts from a mailbox, use the following code:
Search-Mailbox -Identity administrator ` -SearchQuery "Kind:Contacts" ` -DeleteContent ` -Force
If you want to delete all the notes from a mailbox, use the following code:
Search-Mailbox ...
Get Microsoft Exchange Server 2013 PowerShell Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.