?
Solved

Powershell script to find all messages containing keyword.

Posted on 2010-01-10
3
Medium Priority
?
2,688 Views
Last Modified: 2012-05-08
Hi All,

I've been trying to write a powershell script for our Exchange 2007 server that has around 300 mailboxes. We occassionally have a requirement based upon the freedom of information act to disclose to a customer all of the information we hold electronically about them.

What I am trying to achieve is a method of searching across all mailboxes for a particular keyword "e.g. *Mr Smith*" contained within the email, and then to export this to a PST file.

I've been playing with Export-Mailbox and -PSTFolderPath methods, but I just keep going round in circles.

Does anyone know if this is possible? If not possible across the entire mailbox database, is there a script that would work on a single mailbox?

Best wishes
Steve


0
Comment
Question by:callflowsolutions
[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 49

Accepted Solution

by:
Akhater earned 2000 total points
ID: 26278505
0
 
LVL 49

Expert Comment

by:Akhater
ID: 26278517
Sorry for the link only approach but I was leaving.

The above link will show you how to do what you want and export the result to another mailbox. It shld be easy to change it to a pst.

Will be back in a few hours.

0
 

Author Closing Comment

by:callflowsolutions
ID: 31675223
Hi Akhater,

Excellent stuff. Thanks very much for the quick response. I was able to quickly combine the two commands to get what I wanted.

"get-mailbox - Database "Mailbox Database" | Export-Mailbox ContentKeywords "MySearchData" TargetMailbox Administrator TargetFolder 'COPYOFEMAILS'

Thanks again!
Steve
0

Featured Post

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
Find out what you should include to make the best professional email signature for your organization.
In this video we show how to create a Shared Mailbox 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 >> Sha…
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…
Suggested Courses

752 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