Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Need to delete a Message Class from mail store

Posted on 2008-06-25
3
Medium Priority
?
2,623 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
  • 2
3 Comments
 
LVL 3

Assisted Solution

by:prav007
prav007 earned 400 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

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

As much as Microsoft wants to kill off PST file support, just as they tried to do with public folders, there are still times when it is useful or downright necessary to export Exchange mailboxes to PST files. Thankfully, it is still possible to e…
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Suggested Courses
Course of the Month11 days, 23 hours left to enroll

916 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