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
Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
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…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

840 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