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

x
?
Solved

Purge all deleted items folders on Excahange 2013 Database

Posted on 2016-09-01
4
Medium Priority
?
88 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 17

Accepted Solution

by:
Todd Nelson earned 2000 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 17

Expert Comment

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

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Question has a verified solution.

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

On September 18, Experts Exchange launched the first installment of the Help Bell, a new feature for Premium Members, Team Accounts, and Qualified Experts. The Help Bell will serve as an additional tool to help teams increase question visibility.
Stellar Exchange Toolkit: this 5 in 1 toolkit comes loaded with mega-software tool. Here’s an introduction to tools’ usage and advantages:
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses

916 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