Quantcast
Channel: Exchange Server 2013 - Administration, Monitoring, and Performance 论坛
Viewing all articles
Browse latest Browse all 8719

Delete messages older than a specific date in Exchange 2013

$
0
0

Hello.

My aim is to archive old emails to a pst file directly from Exchange 2013 cu3 server, without the need to do it manually on each Outlook client. I can export the messages, but I cannot successfully delete them. I tried with:

Search-Mailbox mailboxname-SearchQuery 'Received:<=12/31/2013 and kind:email' -DeleteContent

but it doesn't delete all the emails. With the following cmdlet I can successfully list all the messages that should be deleted:

New-MailboxSearch -Name estimate -SourceMailboxes mailboxname -SearchQuery 'received<"2012-12-31" AND kind:email' -EstimateOnly

Unfortuntaly New-MailboxSeach doesn't have a -DeleteContent switch, as far as I know, and if I use the same "SearchQuery" string in Search-Mailbox, the result isn't correct. Does anyone have a clue about it please? I'm really frustrated...

Thank you!



Viewing all articles
Browse latest Browse all 8719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>