Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Exchange power shell 2010 - emptying deleted items folder

Posted on 2013-11-18
5
Medium Priority
?
5,698 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
  • 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 43

Accepted Solution

by:
Adam Brown earned 2000 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 43

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

885 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