Delete Emails from particular mailbox recieved by few email ids and in between specific period - Exchange 2010

Hi Experts,

I have to delete emails from particular mailbox with specific conditions:

1) received by few specific email ids

2) between specific time stamp / period  ( ex: from august month to November month)

My environment is Exchange 2010

October 11th, 2014 11:21am

Not matching My requirement.............

I need to delete all the mails from my mail box from few particular user ids for specific time stamp.

example: just mails from users A, B, C between dates x & y months

 

October 11th, 2014 1:44pm

if number of users are limited , grant yourself full access rights to their mailboxes and have configured their profile in local OL followed by making a rule to automate workflow as per your requirements .
Free Windows Admin Tool Kit Click here and download it now
October 11th, 2014 4:59pm

Please try this. This will search John's mailbox for email from thomas@contoso.com received between 1-1-2010 and 31-12-2014 and delete it.
Get-Mailbox -identity John | Search-Mailbox -SearchQuery "From:thomas@contoso.com","Received:> $('1/01/2010') and Received:< $('12/31/2014')" -TargetMailbox test -TargetFolder test -DeleteContent -loglevel full

October 11th, 2014 7:53pm

Thanks for Reply. I will try and let you know

Free Windows Admin Tool Kit Click here and download it now
October 12th, 2014 1:34pm

Hi,

I have a test in my environment using Exchange 2010, I recommend you refer to the following cmdlet to delete the messages from some specified users between specified period.

Get-Mailbox -identity xxx | Search-Mailbox -SearchQuery 'From:amy01@contoso.com AND Received:> 01/01/2010 AND Received:< 13/10/2014' -TargetMailbox amy01 -TargetFolder "test" -DeleteContent -loglevel full

Note: The above date formats should be consistent with the data formats in your server.

Hope this can be helpful to you.

Best regards,

October 13th, 2014 8:55am

Hi Siraj,

If you want to specify multiple from addresses you can try below.

Get-Mailbox -identity john | Search-Mailbox -SearchQuery "From:thomas@nsportq8.com -or From:mas@nsportq8.com","Received:> $('1/01/2010') and Received:< $('12/31/2014')" -TargetMailbox test -TargetFolder test -DeleteContent -loglevel full
This will search John's mailbox for emails from thomas@contoso.com and mas@contoso.com which is received between 1-1-2010 and 31-12-2014 and delete it. And you can see the deleted items details in test folder in test mailbox 
Free Windows Admin Tool Kit Click here and download it now
October 13th, 2014 11:41am

Troy,

Similarly if i want to delete email in organization wide using the time stamp, how can i do it? based on key word and time stamp.

June 1st, 2015 5:48am

Depends really, are you looking for a keyword in the body, subject line, attachments?
Free Windows Admin Tool Kit Click here and download it now
June 1st, 2015 10:17am

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

Other recent topics Other recent topics