Skip to Main Content
Microsoft Exchange 2010 PowerShell Cookbook
book

Microsoft Exchange 2010 PowerShell Cookbook

by Mike Pfeiffer
July 2011
Intermediate to advanced content levelIntermediate to advanced
480 pages
11h 54m
English
Packt Publishing
Content preview from Microsoft Exchange 2010 PowerShell Cookbook

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

Kind

Kind:email

Kind:meetings

Kind:tasks

Kind:notes

Kind:docs

Kind:journals

Kind:contacts

Kind:im

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 contacts from a mailbox, use the following code:

Search-Mailbox -Identity administrator `
-SearchQuery "Kind:Contacts" `
-DeleteContent `
-Force

If you want to delete all notes from a mailbox, use the following code:

Search-Mailbox -Identity ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition - Second Edition

Microsoft Exchange Server 2013 PowerShell Cookbook: Second Edition - Second Edition

Jonas Andersson, Mike Pfeiffer

Publisher Resources

ISBN: 9781849682466Other