Solved

Script to delete contents of a specified Exchange 2003 based Outlook Inbox permanently

Posted on 2006-11-02
18
426 Views
Last Modified: 2010-04-08
Has anyone got a script that will delete the contents of a specified Outlook inbox permanently (ie not go into deleted items)?
0
Comment
Question by:ITWB
  • 4
  • 3
  • 2
  • +6
18 Comments
 
LVL 10

Expert Comment

by:LuckyLuke57
ID: 17856498
Hi ITWB,

Select the contents of the whole folder (ctrl-A)
Press shift-delete
Confirm

In stead of the whole folder, you can select a selection of items by pressing ctrl and clicking with the left mouse button on each message you want to delete.

Lucky Luke
0
 

Author Comment

by:ITWB
ID: 17856550
I need a script that actually deletes the contents of an outlook inbox without acrually opening Outlook and/or logging on as the user.
0
 
LVL 16

Expert Comment

by:Wadski
ID: 17856614
Open AD
Delete the users entry (or just Exchange Mailbox)
Open Exchange System Manager
Navigate to the users mailbox
Run Cleanup Agent
Purge Users Mailbox.
0
 

Author Comment

by:ITWB
ID: 17856629
No I don't wan't to delete a user's entry or mailbox, need mailbox to remain  active, I just want to be able to, say once a month purge it's contents.
0
 
LVL 9

Expert Comment

by:robjeeves
ID: 17856783
Mate you need to use Exmerge.  Free MS app that can remove content from lots or single Mailbox.  Have a read here

http://www.msexchange.org/tutorials/MF013.html

Hope this helps

Rob
0
 
LVL 9

Accepted Solution

by:
robjeeves earned 250 total points
ID: 17856789
It's also scriptable with exmerge -b option. Have a read up on it but you'll find it a very useful tool for exchange

Rob
0
 
LVL 76

Assisted Solution

by:David Lee
David Lee earned 250 total points
ID: 17856960
Greetings, ITWB.

Have a look at this: http://www.outlookcode.com/codedetail.aspx?id=41

Cheers!
0
 
LVL 76

Expert Comment

by:David Lee
ID: 17856990
ITWB,

> I need a script that actually deletes the contents of an outlook inbox
> without acrually opening Outlook and/or logging on as the user.

I hadn't seen this post when I posted my first comment.  This is impossible using Outlook or CDO unless you're an Exchange admin or the user has delegated access to their mailbox to you and you've added that mailbox to your Outlook profile.  You'd have to follow robjeeves' suggestion about using Exmerge or some other tool at the Exchange server itself.  
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 18

Expert Comment

by:kjanicke
ID: 17857511
Exmerge is an exchange utility that can be used to extract mail based on specific criteria .. suchb as a specific attachment, or subject line.

Mailbox manager can delete things from specific folders based on the time and date stamp.

If you hold the shift key down when you delete something in outlook, it will not go to the deleted items bin, but you may still recover it with the DumpsterAlwayson registry key.

To dump somebody else's, you need access, either delegate, or thru AD settings.

Just to expand on the subject, why do you want to delete everything in another users folder?  Maybe we can help another way.
0
 
LVL 11

Expert Comment

by:StuartWhyte
ID: 17857978
Hi,

Are you using exchange?  If so what version??

You can do this using a recipeient policy in exchange.  Let me know what version you are running and I will give you the steps.

Stuart
0
 

Author Comment

by:ITWB
ID: 17859942
Stuart - we are using Exchange 2003

0
 

Author Comment

by:ITWB
ID: 17859953
Kjanicke - I want to delte mail from anotther users mailbox as those mailboxes are not "owned" by a person they are used for administrative purposes
0
 
LVL 9

Expert Comment

by:robjeeves
ID: 17860436
Mate the answer has been given - two options;

Exmerge -b line or use Mailbox manager. As i suggested 1st Exmerge is my tool of choice but the suggestion of mailbox manager is equally suitable.  No need for scripting.  Either of these tools will do exactly what you need.

Hope this helps

Rob
0
 
LVL 18

Expert Comment

by:kjanicke
ID: 17862019
Or if you are an admin guy, give yourself access to the mailbox.
0
 
LVL 4

Expert Comment

by:MikeSel
ID: 17921024
You could make a VB script in outlook to delete the mail from inbox, then delete it again from Deleted Items.. However it would have to be run on the outlook client in question.
0
 
LVL 11

Expert Comment

by:StuartWhyte
ID: 17926236
Ok, herers how ti do it on exchange.  Create a new mailbox store, move the mailbox in question to this store, the create a recient policy on the store to do a regular mail box clean up.  There are a number of options you can choose but the ones you should be looking at are the ones to permanently delete and set it to run every month.

I dont have an exchange 2003 set5up to hand, so am doing this from memory.  If you need  more help, let me know and I'll set up a test bench.

Stuart
0
 
LVL 27

Expert Comment

by:michko
ID: 19650225
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup Zone:
SPLIT robjeeves {17856789} & BlueDevilFan {17856960}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

michko
Experts Exchange Cleanup Volunteer
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Find out how to use dynamic social media in email signatures with this top 10 DOs & DON’Ts.
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

706 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