将在组织的所有邮箱中搜索包含邮箱中主题包含“info2”短语的邮件,然后从源邮箱中删除这些邮件
Get-Mailbox | Search-Mailbox -SearchQuery 'Subject:"info2"' -DeleteContent或(不提示)Get-Mailbox | Search-Mailbox -SearchQuery 'Subject:"info2"' -DeleteContent -Force
删除特定邮箱特定主题的邮件
Search-Mailbox -Identity "jg" -SearchQuery 'Subject:"infoone"' -DeleteContent
删除特定邮箱某个时间段的邮件
Search-Mailbox -Identity "jg" -SearchQuery "Received:03/19/2014..04/10/2014" -DeleteContent
删除所有内用户邮件
Get-Mailbox | Search-Mailbox -DeleteContent或(不提示)Get-Mailbox | Search-Mailbox -DeleteContent -Force
------------------------------------------------------------
查询某个邮箱的发送情况:Get-MessageTrackingLog -ResultSize unlimited -Start "09/28/2014 09:00:00" -End "09/28/2014 18:00:00" -EventId "send" -Sender "xiezy@contoso.com"