Quantcast
Channel: Exchange Server 2013 - Outlook, OWA, POP, and IMAP Clients forum
Viewing all articles
Browse latest Browse all 10580

Mailbox mails to be remove through shell

$
0
0

Hi,

I need to keep one of the mailbox mails to be reserve present two days only and past mails are to be removed.

I have tried below command from exchange shell but it's not worked out.

Get-Mailbox -identity migrationking@domain.com | Search-Mailbox -SearchQuery 'Received:<(Get-Date).AddDays(-2).ToString('MM-dd-yyyy')' -TargetMailbox "migrationking@domain.com" -DeleteContent -loglevel full

Please suggest on this.

Regards,

Kumar N


Viewing all articles
Browse latest Browse all 10580

Latest Images

Trending Articles



Latest Images

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