Search and Delete Message

Hello,

Is there an option or power shell command to search and delete messages using "Date and Time" query.  There are some suggestions online that I found on TechNet, but these are specific to Subject and attachment.  What if you want to research by Date and Time?

Samples that I found online:

Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery 'Subject:"Download this file"' -DeleteContent

Search-Mailbox -Identity "April Stewart" -SearchQuery 'Subject:"Your bank statement"' -DeleteContent

Get-Mailbox -ResultSize unlimited | Search-Mailbox -SearchQuery attachment:trojan* -TargetMailbox administrator -TargetFolder "SearchAndDeleteLog" -LogOnly -LogLevel Full

Please advise, thanks.

August 13th, 2015 1:46am

Yes there are date range parameters, here's an example https://social.technet.microsoft.com/Forums/exchange/en-US/b4457fc4-ea56-45e8-9763-4402b2120157/exchange-2010-searchmailbox-date-range-query?forum=exchange2010
August 13th, 2015 10:56am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics