The following table outlines the properties that can be used to define an AQS query using a message type restriction:
Property |
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 |
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 administrator ` -SearchQuery "Kind:Notes" ` -DeleteContent ` -Force