Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2010-08-23
3
Medium Priority
?
780 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
[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
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 2000 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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…
After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
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…

688 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