We help IT Professionals succeed at work.

Exchange 2010 SP3 delete Sent Items folder e-mails for specific mailbox

Bob Alvarez
Bob Alvarez asked
Last Modified: 2018-02-02
Client requesting that all Sent Item e-mails for a specific mailbox be deleted, keeping all other e-mails intact. In researching this request there doesn't appear to be a clear answer on how to achieve this result. Note, I only want this for one mailbox not for all mailboxes.
Watch Question

IT Engineer
Distinguished Expert 2017
Unlock this solution and get a sample of our free trial.
(No credit card required)
Schnell SolutionsSystems Infrastructure Engineer

Let-s say that you want to delete the items inside the 'SentItems' container for user 'johnsmith'. You are planning to use your 'Admin01' account to do that.

1. Assign permissions to the account that will execute the action
Make 'Admin01'  a member of the 'Discovery Management'  security group in Active Directory.
New-Managementroleassignment –Role “Mailbox Import Export” –User “Admin01”

2. Delete the content
Search-Mailbox johnsmith  –searchquery “Foldername:’SentItems’” -DeleteContent


I assigned the new role of Mailbox Import Export, added myself to Discovery Management, but, the Search-Mailbox cmdlet is not found.

Do I need to cycle any service prior to running Search-mailbox?


After restarting PowerShell it allowed me to enter the command. I was prompted to reply Y for Yes, A for yes to all, and N for no, and L fo no to all. I replied Y and after a few mins I got the error message:

The property keyword isn't supported.
    + CategoryInfo          : InvalidArgument: (:) [], ParserException
    + FullyQualifiedErrorId : 35DA203C
Schnell SolutionsSystems Infrastructure Engineer

Oh yeah, the permission takes effect after closing and opening the EMS. And for some cases it is even necessary to logoff and then logon. I was trying here and I can see than that Advance Query parameter is not supported for the command.

One option that I made work something similarly here was using the parameter 'from:johnsmith". However, it will delete all the messages within that mailbox that were sent by the user. But the point is that if a message was sent by the user and later moved to another folder, then it will be deleted. I do not know if it applies for your case.

Search-Mailbox johnsmith -SearchQuery "from:johnsmith" -DeleteContent

If you want to avoid the prompt asking you to confirm you can add the parameter ' -Force ' (However, it is a very dangerous command and a lot of car need to be taken with this. It is even better to save the filter somewhere, validate than that is the information that you want and then delete the information).

Delete without asking:

Search-Mailbox johnsmith -SearchQuery "from:johnsmith" -DeleteContent -Force

And in case that you have messages that were sent to a different folder, you can specify the exclusion for some folders. For example:
AmitIT Architect
Distinguished Expert 2017

Remember, if you remove it via PS, there is no roll back or recovery point. You should always use target mailbox with search mailbox cmdlet.


Used Outlook as suggested, other ideas..while good.... did not allow for the delete.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.