Solved

Purge all deleted items folders on Excahange 2013 Database

Posted on 2016-09-01
4
32 Views
Last Modified: 2016-09-24
Looking at a script to purge all deleted items for all users on an exchange database.

Exchange Version = 2013
Folder to Purge = Deleted Items

I have been looking at scripts from 2010 but can't get search-mailbox / export-mailbox to work.

Any help would be greatly appreciated.

Matt
0
Comment
Question by:HRSB
  • 2
4 Comments
 
LVL 9

Expert Comment

by:DeBlackman
ID: 41779793
0
 
LVL 14

Accepted Solution

by:
Todd Nelson earned 500 total points (awarded by participants)
ID: 41782546
I would recommend setting up retention tags to delete all items in the deleted folder after X number of days, add the tags to a retention policy and apply that policy to the user mailboxes in the specific database.

Retention tags and retention policies ... https://technet.microsoft.com/en-us/library/dd297955(v=exchg.150).aspx

After the tags and policy are created, apply the policy to every mailbox in a specific database using this command...

Get-Mailbox -Database "DatabaseName" | Set-Mailbox -RetentionPolicy "PolicyName"

Open in new window


Hope this helps.
0
 
LVL 5

Expert Comment

by:bobluis
ID: 41784481
Search-Mailbox -Identity "Nam_of_mailbox" -DeleteContent -Force

Open in new window


Before executing the command make sure you've exported all the mail content, once the command executes it will delete all the items, so use with caution.
0
 
LVL 14

Expert Comment

by:Todd Nelson
ID: 41813582
You should have enough information to provide you with a solution.
0

Featured Post

Too many email signature updates to deal with?

Do you feel like you are taking up all of your time constantly visiting users’ desks to make changes to email signatures? Wish you could manage all signatures from one central location, easily design them and deploy them quickly to users? Well, there is an easy way!

Join & Write a Comment

Local Continuous Replication is a cost effective and quick way of backing up Exchange server data. The following article describes the steps required to configure Local Continuous Replication. Also, the article tells you how to restore from a backup…
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now