Search Criteria not applying
I am trying to run an Export-Mailbox on my entire server. That part is working. What I am having a problem with is the search conditions are not applying. Here is my script: Get-Mailbox -Server ServerName | Export-Mailbox -AllContentKeywords "First Last","First","Last","email@comany.com" -StartDate "04/02/2012" -EndDate "04/03/2012" -TargetMailbox test -TargetFolder Test What I am getting are emails that don't fit the search criteria, and have actually been deleted but are showing up in the exported Inbox. They don't have the Content Keywords in the subject, body or attachment, and is not inside the date range. Any help would be greatly appreciated. Exchange 2007 SP1 Thanks.
April 4th, 2012 11:29am

I have removed all the Content Keywords except "email@company.com" And it's still pulling email it shouldn't.
Free Windows Admin Tool Kit Click here and download it now
April 4th, 2012 12:14pm

The only way I can see to troubleshoot this issue is to see some of the items that are exported. The AllContentKeywords attribute searches every aspect of the email body, subject, or the attachment content to try and find a match. If you are only looking for the item in the Body, use ContentKeywords that searches the Body or attachment content, or SenderKeywords for TO: field items, RecipientKeywords for FROM: field items , and SubjectKeywords for items in the Subject. I say all of that to say, if the email address you are using in AllContentKeywords is in a signature line or something like that in the body of the emails in the mailbox, it will match and export.
April 4th, 2012 4:19pm

Hi Please try the command Get-Mailbox -Server ServerName | Export-Mailbox -allcontentkeywords (("First Last") -or ("First") -or ("Last") -or ("email@comany.com")) -StartDate "04/02/2012" -EndDate "04/03/2012" -TargetMailbox test -TargetFolder Test Cheers Zi FengZi Feng TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
April 5th, 2012 10:29pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics