Solved

Need to delete a Message Class from mail store

Posted on 2008-06-25
3
2,590 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

Read this checklist to learn more about the 15 things you should never include in an email signature.
Many people use more than one email account and so it becomes difficult for them to manage them when they use separate accounts,  so, in this article, I have shared an easy way to add Other Mail Accounts in your Google Inbox. It helps to combine all…
To show how to create a transport rule 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 >> Rules tab.:  To cr…
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…

735 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