Solved

Delete ALL emails in the /Inbox from a command prompt

Posted on 2008-09-29
6
891 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
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:
Icetoad 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:Icetoad
ID: 22606530
http://technet.microsoft.com/en-us/library/bb310756.aspx

in exchange 2007 its called Messaging Records Management
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
Read this checklist to learn more about the 15 things you should never include in an email signature.
In this video we show how to create a Contact 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 Recipients >> Contact ta…
To show how to create a transport rule 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 >> Rules tab.:  To cr…

839 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