exchange 2013 cmdlet -删除关键邮件及统计

将在组织的所有邮箱中搜索包含邮箱中主题包含“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 "07/04/2014" -End "30/04/2014" -EventId "send" -Sender "[email protected]" |Measure-Object

 

你可能感兴趣的:(Exchange)