Solved

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

Posted on 2010-08-23
3
736 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 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Unified and professional email signatures help maintain a consistent company brand image to the outside world. This article shows how to create an email signature in Exchange Server 2010 using a transport rule and how to overcome native limitations …
In this video we show how to create an Accepted Domain 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 >> Ac…
how to add IIS SMTP to handle application/Scanner relays into office 365.

734 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