Solved

Purge all deleted items folders on Excahange 2013 Database

Posted on 2016-09-01
4
37 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:Ibrahim Benna
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
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…

910 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

23 Experts available now in Live!

Get 1:1 Help Now