Solved

Delete ALL emails in the /Inbox from a command prompt

Posted on 2008-09-29
6
863 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now