Solved

Exchange power shell 2010 - emptying deleted items folder

Posted on 2013-11-18
5
5,132 Views
Last Modified: 2013-11-19
is there a way or a combination of cmdlets one could use to empty a users deleted folder ?

I have heard of search-mailbox but not seeing much in the help on how to use it.
0
Comment
Question by:jrojas1213
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 13

Expert Comment

by:imkottees
ID: 39657451
Hi,

Here you go:

Search-mailbox -identity <alias> -SearchDumpsterOnly -DeleteContent

http://stevehardie.com/2012/05/exchange-2010-purge-dumpster/
0
 
LVL 1

Author Comment

by:jrojas1213
ID: 39657492
yes I found that and did not work because that is deleting the dumpster which is where it goes after a user empties the deleted folder.  that way when they say oops there is still time to recover it.
0
 
LVL 40

Accepted Solution

by:
Adam Brown earned 500 total points
ID: 39657812
Search-mailbox can't really be used because you can't use it to return all the results of a specific mailbox folder. Rather, to clear out the deleted Items folder for all or specific users, you would want to make use of the retention policies. Create a retention policy for the Deleted Items folder, set it for a week or a day or however long, and apply it to the user. There is a default retention policy in place that clears the deleted items folder after 30 days, but you have to make sure it's applied and the emails in the deleted items folder are tagged with that policy.
0
 
LVL 1

Author Comment

by:jrojas1213
ID: 39659441
Thanks for the solution acbrown.  I have applied the retention policy and found out that it does not apply the policy according to the mailbox processing which is set in my case to 24 hours.  I have run Start-ManagedFolderAssistant -Identity “Administrator” to force but the policy still has not applied.  does it still take some time even after the force ?
0
 
LVL 40

Expert Comment

by:Adam Brown
ID: 39660734
Existing emails have to be "tagged" with the policy in order to get removed by it. You can do this by opening the mailbox is outlook and right-clicking the folder, then selecting the option to apply the existing retention policy (I think. I don't have a valid test in front of me at the moment. Working off memory).
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to install and use the NTBackup utility that comes with Windows Server.
In-place Upgrading Dirsync to Azure AD Connect
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question