• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 262
  • Last Modified:

Remove one email accross mailboxes

I need to remove one specific email fro all mailboxes across the organization, We have Exchnage 2007
0
nourben
Asked:
nourben
  • 3
  • 2
2 Solutions
 
IamTheMorsaCommented:
Export-Mailbox cmdlet.
http://msexchangeteam.com/archive/2006/12/18/431934.aspx

ie

Export-Mailbox -Identity "First.Lastname" -SubjectKeywords "This is my test message." -DeleteContent
0
 
nourbenAuthor Commented:
It work on my mailbox but accross the mailboxes should I use

Export-Mailbox -Server "ServerName" -SubjectKeywords "This is my test message." -DeleteContent
0
 
OctInvCommented:
You need to pipe in another command first, such as:

get-maillbox -server exchangeservername | Export-Mailbox -SubjectKeywords "keyword" -DeleteContent

This will do the jon for the entire mailbox server.
0
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
nourbenAuthor Commented:
Is there a way to export to a PST file before the delete
0
 
OctInvCommented:
Yes, you can use the -PSTFolderpath switch.
0
 
OctInvCommented:
Also note that you can't run -PSTFolderpath in a 64bit environment.  The best way to do this is to install the Exchange management tools on a 32bit machine along with Outlook and run the -PSTFolderpath command from there.
Hope this helps.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now