Conducting searches across multiple users

Hi All,

It has been requested to conduct a keyword search across all users in our Exchange 2007 SP2 for some legal purposes. I tried to use export-mailbox cmdlet in power shell to export the filtered search results into PST files. However, it generates one PST file per user even though the user's mailbox does not contain any mail item matching the filtered keyword in export-mailbox. In short, I ended up having more than 400 PST files in various sizes, and I do not know how to process those PST files easily to find out which one(s) have any mail items containing the actual keyword that I used in export-mailbox.

Could you please advice how to conduct such keyword searches across all users in Exchange 2007 SP2 in a easy and simple way?

Thanks!
BCSCOPSAsked:
Who is Participating?
 
Rick FeeMessaging Engineer - Disaster Recovery EngineerCommented:
This might start you off on the right off that will do quick  searches/copies.   I'm not sure but you might be able to put the users  email addresses in -contentKeywords

First you need a 32 bit  system with Outlook 2003 SP2 and the Exchange  2007 Console installed.   Yes this is a slight pain and the user you  are logged on to using the PowerShell needs full access to the users  mbx.

This works:

Entire MBX database:
Get-Mailbox  -Database "Mailbox Database" | export-mailbox -ContentKeywords "Ironman Australia" -TargetFolder " IMOZ  Export" -TargetMailbox Administrator

    Note:    This takes a copy  of all emails with the word triathlon and created a folder called  Triathlon Export in the Administrator mailbox.    Does not export to a  PST.

Individual User:
Get-mailbox rfee  | export-mailbox  -ContentKeywords "Ironman Australia"  -TargetFolder "IMOZ Export" -TargetMailbox Administrator
   Note:     This takes a copy of all emails with the word triathlon and created a  folder called Triathlon Export in the Adminstrator mailbox.

You  can set dates and add other switches...
 -StartDate  "<Month/Day/Year>" -EndDate "<Month/Day/Year>"
0
 
Rick FeeMessaging Engineer - Disaster Recovery EngineerCommented:
I documented this at the last place and will look for it tonight...there is more to the instructions where you can export to a PST.    But with my instructions above once you get the emails into a folder you can export that folder to a PST.
0
 
BCSCOPSAuthor Commented:
Thanks for the reply. However, the issue with that, the export operation creates the full folder structure under the target folder of targetmailbox, and never deletes them even if they do not contain any relavent item according to the -ContentKeyWords switch. And if you multipy that by number of users on the server, say 400, it ends up again having all 400 users' folder structure.  So, my question becomes how do you easily get the items you are really interested in without going through the blank folders of 400 users manually?
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

 
Rick FeeMessaging Engineer - Disaster Recovery EngineerCommented:
Yes let me look at what I did back when I ran this...for me it dumped everything into one folder.    I will attempt to post it tonight.
0
 
Rick FeeMessaging Engineer - Disaster Recovery EngineerCommented:
Sorry I was a bit busy last night...I will take a look tonight if you don't find your resolution.

Or try this:  Get-Mailbox -Identity jshmoe | Export-Mailbox -SubjectKeywords "VirusWarning" -IncludeFolders "\Inbox" -StartDate "02/24/2010" -TargetMailbox emaildump -deletecontent

If I have time today I can play around with it...

0
 
BCSCOPSAuthor Commented:
Thanks for the help. What I did so far is that I used export-mailbox cmdlet with targetfolder and targetmailbox settings. Then I exported that targertfolder into a PST file. After that, I opened it up in Outlook, and did an advanced search in Outlook. That search gave me the mail items I wanted and I copied them into another folder, which eventually exported into another PST file to be handed over to the orginal requester.
0
 
Rick FeeMessaging Engineer - Disaster Recovery EngineerCommented:
Cool cool so you did you Get-Mailbox  -Database "Mailbox Database" | export-mailbox -ContentKeywords to move these to a outlook profile then ran Outlook search?
0
 
BCSCOPSAuthor Commented:
That's right!
0
 
Rick FeeMessaging Engineer - Disaster Recovery EngineerCommented:
So if you using something I posted and said that you did why are you awarding zero points?
0
 
BCSCOPSAuthor Commented:
I had already used export-mailbox: with targetmailbox first, then with PSTFolderPath, but I did not like the output as explained above. Then eventually, again by myself I figured out using the Outlook Advanced search on those results generated by the export-mailbox. In that sense, your suggestion was not new to me. I was asking if there was any other way to do that except export-mailbox.

Sorry for the misunderstanding.
0
 
BCSCOPSAuthor Commented:
Issue resolved
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.

All Courses

From novice to tech pro — start learning today.