?
Solved

Delete message from all mailboxes from Exchange Server 2007 by Messaage ID

Posted on 2010-01-11
7
Medium Priority
?
1,286 Views
Last Modified: 2012-05-08
I have done this in the past using exmerge, but I don't know the command to do it on Exchange 2007. Using the Exchnage Management Shell I know how to delete messges by subject or sender by using the get-mailbox command, for example Get-mailbox -database 'database' | export-mailbox -SubjectKeywords "Test" -DeleteContent. How is it done by Message ID? Sometimes the suject keywords are common and I don't want to remove all messages from a particular sender. For example,  a user sends out an inappropriate e-mail that says see attached in the subject line.

Thanks,
0
Comment
Question by:nlreinhold
[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
  • 2
7 Comments
 
LVL 27

Expert Comment

by:shauncroucher
ID: 26284840
I don't believe you can specify by MessageID using export-mailbox, but is there content within the email body that is unique enough?

Is so, you could use -AllContentKeywords (for body and subject) or -contentkeywords for body only.

Shaun
0
 
LVL 20

Expert Comment

by:Satya Pathak
ID: 26284842
go through.

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

More Info:
http://msexchangeteam.com/archive/2006/11/28/431669.aspx
http://msexchangeteam.com/archive/2006/12/18/431934.aspx
0
 

Author Comment

by:nlreinhold
ID: 26284938
shaucroucher: When using -AllContentKeyowords will it delete specific strings or all words within a string? For example: "A man got burnt while steeling copper", would also delete e-mails containing the following sentence. Steeling from the company is a criminal offense, or The price of copper is 2.53 a pound.
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
LVL 27

Accepted Solution

by:
shauncroucher earned 1000 total points
ID: 26285031
It will delete the entire message. The -allcontentkeywords is just a way of identifying which ones to extract. It will find the exact phrase only, not any keyword. Use -whatif to see what it would do if you ran it, without taking action.

You could also export to one mailbox instead of delete to verify what has been exported.

Shaun
0
 

Author Comment

by:nlreinhold
ID: 26285086
Thanks shauncroucher, I like the what if part. I have exported to an administrator mailbox but with as many users I have across the organization it creates a lot of folders to look through to make sure it removed them. It maintains the directory structure of each user mailbox as a sufolder of "recovered".
0
 
LVL 27

Expert Comment

by:shauncroucher
ID: 26285233
Glad I could help,

Shaun
0
 
LVL 27

Expert Comment

by:shauncroucher
ID: 26285243
You might want to try adding -TargetFolder to see if that bunches all the items in one folder, I'm not sure if it does

Shaun
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

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.
A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
In this video we show how to create a Contact 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 Recipients >> Contact ta…
how to add IIS SMTP to handle application/Scanner relays into office 365.
Suggested Courses

801 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