Solved

Delete ALL emails in the /Inbox from a command prompt

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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

739 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