Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2006-11-02
18
Medium Priority
?
470 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
[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
  • 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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 

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 1000 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 1000 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
 
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

What does UTC stand for?  “Coordinated Universal Time” – Think of this as the true time on Planet Earth that never changes with the exception of minor leap seconds here and there to account for the changes in the planet's rotation.   What does th…
This article will help to fix the below error for MS Exchange server 2010 I. Out Of office not working II. Certificate error "name on the security certificate is invalid or does not match the name of the site" III. Make Internal URLs and External…
Many of my clients call in with monstrous Gmail overloading issues with Outlook. A quick tip is to turn off the All Mail and Important folders from synching. Here is a quick video I made to show you how to turn off these and other folders in Gmail s…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

730 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