Solved

Delete ALL emails in the /Inbox from a command prompt

Posted on 2008-09-29
6
913 Views
Last Modified: 2013-12-09
Is there a DOS command to delete all emails in the Inbox of Outlook for a user.

Here's the scenario, I have setup the Symantec Antispam on the Exchange server and redirected all spam messages to go to a email address spam@domain.com. This mailbox gets full VERY FAST and hence it gets difficult after a few days or weeks to delete all the messages from Inbox, in Outlook itself.

Please help. Thanks in advance.
0
Comment
Question by:gerriya3
[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
6 Comments
 
LVL 29

Expert Comment

by:mass2612
ID: 22601215
Hi,

Your best bet from the shell is probably export-mailbox. You can export the contents of a mailbox to PST and also select to delete the data using the switches -DeleteContent or -DeleteAssociatedMessages.

Exchange 2007 SP1 Mailbox Management Features - Part 1: Importing and Exporting Mailbox data to and from PST files
http://www.msexchange.org/articles_tutorials/exchange-server-2007/management-administration/exchange-2007-sp1-mailbox-management-part1.html
0
 
LVL 3

Expert Comment

by:omic_admin
ID: 22601715
so it wouldn't be easier to just attach the mailbox to your Outlook profile and just pressing Ctrl-A and delete regularly on that mailbox?
0
 
LVL 8

Accepted Solution

by:
Brent earned 500 total points
ID: 22603153
I would just setup a recipient policy that uses the mailbox management process to delete all emails in that mailbox nightly.

http://www.msexchange.org/tutorials/Mailbox-Management.html 

Very handy in keeping users email boxes clean of deleted items and junk email too.
0
 

Author Comment

by:gerriya3
ID: 22606216
I want to do this on a regular basis, maybe everyday - AUTOMATICALLY (maybe put it as a scheduled task)
Omic_admin, I know it sounds easy...CTRL+A and delete but this Inbox gets filled with around 5-6 thousand spam emails a day and if we forget to delete the emails ... in a week or 2 there are close to 100,000 emails...
I am looking at Icetoad's idea....sounds like it could be it...but the link is for Exchange 2003, do you have the link for 2007...else I will just research myself...
Thanks everybody

0
 
LVL 8

Expert Comment

by:Brent
ID: 22606530
http://technet.microsoft.com/en-us/library/bb310756.aspx

in exchange 2007 its called Messaging Records Management
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
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…
This video discusses moving either the default database or any database to a new volume.

617 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