Solved

Purge all deleted items folders on Excahange 2013 Database

Posted on 2016-09-01
4
68 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
[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
4 Comments
 
LVL 9

Expert Comment

by:Ibrahim Benna
ID: 41779793
0
 
LVL 16

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 16

Expert Comment

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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
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

631 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