Solved

Exchange: Batch searching with EMS.

Posted on 2015-01-20
3
42 Views
Last Modified: 2015-02-01
I have multiple Exchange Servers and I need to search for specific keywords across emails and attachments.  I would like to use EMS and a batch file to perform this.

Does anyone know if this is possible, and if so if you could provide some examples?  The output that I am looking for is a listing of every item in exchange that is responsive to the keywords.

This is for Exchange 2010.
0
Comment
Question by:rye004
[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
3 Comments
 
LVL 53

Accepted Solution

by:
Will Szymkowski earned 500 total points
ID: 40561017
You can use the following script below to accomplish this.

NOTE: before running the script you need to run the command below...
New-ManagementRoleAssignment -Role "Mailbox Import Export" -SecurityGroup "YourSecurityGroupName"


This script will find all of the users in your domain and export each mailbox in its own PST file with any of the contents you are looking for.
$Mailbox = Get-Mailbox -ResultSize Unlimited
Foreach ($user in $Mailbox) {
New-MailboxExportRequest -Mailbox $user -ContentFilter {(body -like "*your txt here*")} -FilePath "\\SERVER\ShareName\$user.pst
}

Open in new window


Will.
0
 
LVL 3

Expert Comment

by:Rezwan Islam
ID: 40561287
You can try to do an exchange discovery search on all mailboxes via ECP or using the following on EMS. Make sure you have got the discovery management role group permission first (get-rolegroupmember -identity "Discovery Management").

New-MailboxSearch -Name "name this search" -StartDate "mm/dd/yyyy" -EndDate "mm/dd/yyyy" -TargetMailbox "target mailbox name" -SearchQuery '"content 1" and "content 2"' -MessageTypes Email -IncludeUnsearchableItems -LogLevel Full

This will create a search folder on the target mailbox and run a search against all mailboxes in your domain.

Ref: https://technet.microsoft.com/en-us/library/dd353189(v=exchg.141).aspx
0
 

Author Closing Comment

by:rye004
ID: 40583351
Thank you so much!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
Compliance and data security require steps be taken to prevent unauthorized users from copying data.  Here's one method to prevent data theft via USB drives (and writable optical media).
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

617 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