Exchange Server - Export-Mailbox - keyword search limit?

Asked By Clay
15-Jan-10 09:47 AM
My environment is single domain, single forest, single Exchange 2007 SP1
server running all email services.
Question - Is there a limit to the number of keyword search terms you can
use when using the Export-Mailbox cmdlet?

Due to a legal action I need to export all email from our Exchange 2007
server that has certain keywords.  I have figured out how to do this using
Exchange management shell, the export-mailbox cmdlet, and
the -contentkeywords filter.  I have successfully ran several test exports
using this filter with up to 15 or 20 keywords specified.   However I need
to search for about 700 keywords at once.  When I try to query with several
hundred terms though it always errors out.   I have formatted this command
into a ps1 script and when I view the resulting xml (log) file it looks
correct.

***error***
Export-Mailbox : Error was found for Miller, Brian (bmiller@cypressrx.com)
because: Error occurred in the step: Moving messa
ges. Failed to copy messages to the destination mailbox store with error: An
unknown error has occurred., error code: -1056749164 At
C:\export-glenn.ps1:1 char:15
+ Export-Mailbox  <<<< -identity bmiller -Baditemlimit 1000 -Targetfolder
("810-99","63717-810-99","810-01","63717-810-01","040-05","63717-040-05","040-99","63717-040-99","038-30","63717-038-30"
***error***

Here is the actual script I am using minus about 700 keywords.
Export-Mailbox -identity bmiller -Baditemlimit 1000 -Targetfolder
("810-99","63717-810-99","810-01","63717-810-01","040-05","63717-040-05","040-99","etc",

I do not believe it is a permissions issue because it will run fine if I
limit the keywords.  But if I put 200+ it always errors out.  I do not know
if there is a limit on the number of keywords you can use or if I have
something formatted wrong in my list.
Any help is much appreciated.
AllContentKeywords
(1)
Targetfolder
(1)
Baditemlimit
(1)
Contentkeywords
(1)
Targetmailbox
(1)
Heirarchy
(1)
Mailboxes
(1)
Identity
(1)
  Clay replied to Clay
18-Jan-10 12:18 PM
Any other thoughts on how to approach my issue?   I just need to search the
all mailboxes against a long list of search terms.
  Ed Crowley [MVP] replied to Clay
18-Jan-10 12:54 PM
Why not run multiple exports?
--
Ed Crowley MVP
.
  Clay replied to Ed Crowley [MVP]
18-Jan-10 02:45 PM
That should work to get the data exported.  It may take considerably longer
(depending on the limit of the keyword search) but that may be my only
option.

If I was able to do the search with all terms I would end up with one
mailbox with a folder for each user in my DB with all relevant messages to
the search inside that folder.

If I run multiple searches (lets say 10) then I will end up with ten folders
for each person (each of these folders will contain each users mailbox
folder heirarchy underneath).  Any suggestion how to consolidate these down
to one folder per person?   Is there a switch I can use to re-export all
messages to a single folder?
Create New Account
help
search criteria. Searching just for 1 word works. This works fihe: export-mailbox -id user -targetfolder "MyExport" -targetmailbox user2 -allowmerge -allcontentkeywords "word1" But this doesn't: export-mailbox -id user -targetfolder "MyExport" -targetmailbox user2 -allowmerge -allcontentkeywords ("word1" -and "word2") I also tried with -allcontentkeywords (("word1" -and "word2") -or ("word1" -and "word55)) , but it's not working. Am I missing sensitive search? Thank you. Exchange Admin Discussions MyExport (1) MVP (1) BF (1) BD (1) Allcontentkeywords (1) Mailbox (1) Export (1) Search (1) ("word1" -and "word2") is not a valid construct
the following command: restore-mailbox -RSGMailbox 'user' -RSGDatabase 'Recovery Storage Group \ Mailbox Database' -id 'Administrator' -TargetFolder 'Backup' - StartDate '08 / 01 / 07' -EndDate '08 / 05 / 07' It creates a folder in administrators the startdate is not observed? Exchange Admin Discussions Microsoft Exchange (1) RSGDatabase (1) RSGMailbox (1) TargetFolder (1) Startdat (1) Melvin.mcphucknuckle (1) Baditemlimit (1) Thoughs (1) Do you get similar results using a four-digit year? The "Regional the startdate is ignored and the restore errors out at the end, even with a baditemlimit = xxxxxx. Started a case with MS and they attribute it to a corrupt RSG, which
Err.Number: 3732) This is the Sub where the error occurs:- PublPublic Sub Copy(ByVal TargetFolder As String) Dim TargetURL As String = "" Dim Rec As ADODB.Record = New ADODB.Record Dim LocalConn As New ADODB.Connection Dim newURL As String = "" If Right$(TargetFolder, 1) <> " / " Then TargetFolder TargetFolder & TargetURL = TargetFolder & hRef LocalConn.Provider = "ExOLEDB.DataSource" LocalConn.Open(URL, , -1) Try LocalConn.BeginTrans() Rec.Open(URL Thanks in advance Mike Exchange Development Discussions ADODB (1) MAPI (1) LocalConn (1) CDO (1) TargetFolder (1) TargetURL (1) UnprocessedBackupFolder (1) URL (1) You cant use Moverecord or copyrecord to copy