Solved

Need to delete a Message Class from mail store

Posted on 2008-06-25
3
2,602 Views
Last Modified: 2008-08-03
I am performing a exchange migration and need to delete a specific type of message from all users mailbox. Message Class = IPM.Note.EAS - this was used for the old archiving system.  I can do it manually from Outlook by logging on to each user's mailbox - doing an advanced find and selecting the Message Class = IPM.Note.EAS. and delete the message.  I would rather not do it manually for each user (100+).  

I am looking for a way to delete these messages using a commandlet.   I was looking export-mailbox with a filter to select the message class and use the delete function.

Ideas?

Thanks!
0
Comment
Question by:e_vanheel
[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
  • 2
3 Comments
 
LVL 3

Assisted Solution

by:prav007
prav007 earned 100 total points
ID: 21872291
Please find an example listed below


Export and delete all messages that contain "Confidential" in their subject from all mailboxes from the DB1 database to a folder called ConfidentialData in the Administrator mailbox:

Get-mailbox -database 'DB1' | export-mailbox SubjectKeywords "Confidential" -TargetFolder "ConfidentialData" -TargetMailbox Administrator DeleteContent

 
0
 
LVL 6

Author Comment

by:e_vanheel
ID: 21874573
Thanks prav007,

I need to delete a specific message class not just search for a keyword.
0
 
LVL 6

Accepted Solution

by:
e_vanheel earned 0 total points
ID: 21956049
I think this should work.  It will take one day to show up as I believe it runs with the maintenance cycle.

New-ManagedContentSettings -FolderName Inbox -MessageClass IPM.Note.eas -Name RemoveArchiveStubs -RetentionEnabled $true -RetentionAction MoveToDeletedItems -AgeLimitForRetention "1"
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this step by step procedure, you will come to know the details of creating an Outlook meeting in 2007, 2010, 2013 & 2016.
There are times when we need to generate a report on the inbox rules, where users have set up forwarding externally in their mailbox. In this article, I will be sharing a script I wrote to generate the report in CSV format.
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: …
CodeTwo Sync for iCloud (http://www.codetwo.com/sync-for-icloud?sts=6554) automatically synchronizes your Outlook 2016, 2013, 2010 or 2007 folders with iCloud folders available via iCloud Control Panel. This lets you automatically sync them with…
Suggested Courses

635 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