Solved

How to delete 2.6million draft emails in powershell in exchange 2007

Posted on 2010-08-23
3
674 Views
Last Modified: 2012-08-13
I have 2.6million (application generated) "Draft" emails in a mailbox (67GB in total) I just want to delete these emails, not the mailbox., can you either recommend a 3rd party tool that integrates with exchange 2007 for accessing the mailstore/mailbox directly to do this or perhaps some powershell code (sorry I don't have a scripting background to know where to start) that would do the trick.

Emails were generated by a 3rd party application which should never have stored them in the drafts folder, something I have inherited and pulling the mailbox down to then delete the mails is proving to be too much for outlook!
0
Comment
Question by:equipped2000
3 Comments
 
LVL 53

Expert Comment

by:Will Szymkowski
ID: 33500474
Take a look at this link as it will illustrate how to accomplish this..
http://lab.r2integrated.com/Wiki.aspx?topic=Exchange_2007_Power_Shell_Tricks

Also look here...
http://msexchangeteam.com/archive/2006/11/28/431669.aspx
(refer to the last section Using filtering to Export and delete mailbox content)

Hope this helps~!
0
 
LVL 32

Accepted Solution

by:
endital1097 earned 500 total points
ID: 33500482
export-mailbox mbx -includefolders "\Drafts" -Deletecontent
0
 

Author Closing Comment

by:equipped2000
ID: 33503229
Just had to permission myself for log store as I got an error when exchange tried to create a log for this, first it seemed like the log entry was missing then I realised I was probably not part of the SG required so added myself to ACL's

When I left it was 80k through 2.6m deletions!

Thanks!
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this video we show how to create an email address policy 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 Mail Flow…
To show how to generate a certificate request 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 >> Certificates…

759 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

19 Experts available now in Live!

Get 1:1 Help Now