Link to home
Start Free TrialLog in
Avatar of equipped2000
equipped2000

asked on

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

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!
Avatar of Will Szymkowski
Will Szymkowski
Flag of Canada image

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~!
ASKER CERTIFIED SOLUTION
Avatar of endital1097
endital1097
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of equipped2000
equipped2000

ASKER

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!