Link to home
Start Free TrialLog in
Avatar of KeyPlastics
KeyPlasticsFlag for United States of America

asked on

Search-Mailbox fails on Exchange 2010 Standard if a query is given

I'm failing horribly at searching a single user's mailbox for any mail containing a particular word.

[PS] C:\Windows\system32>Search-Mailbox -Identity "USER" -TargetMailbox "Support" -TargetFolder "Recovery" -DomainController "dc.local"

Success! But I see every email ever; I need to narrow it down with a search.

[PS] C:\Windows\system32>Search-Mailbox -Identity "USER" -SearchQuery "Body: '*euro*'" -TargetMailbox "Support" -TargetFolder "Recovery" -DomainController "dc.local"


The search has Failed.

       Started by:      local\ADMIN
       Start Time:      3/31/2011 12:26:39 PM
       Size:      0 B (0 bytes)
       Items:      0
       Results:      local\Support
       Errors:      An error occurred when searching USER. The message is 'Search Failed on mailbox 'local\USER\a702b7cd-1921-4f96-9534-76ad00d719a1'. If the search query used short words with wildcard(s) such as pat*, it can result in a large number of words or phrases because all permutations of words starting with “pat” are searched. Make search queries as specific as possible when using wildcards. '.
       Operations performed:      Messages were copied to the target mailbox.
 
       Query:      Body: '*euro*'
       Search Dumpster:      True
       Logging:      Basic
       Mailboxes to search:      (1) local\USER

I've tried:

-SearchQuery "Body: '*euro*'"
-SearchQuery "Body: 'euro'"
-SearchQuery "*euro*"
-SearchQuery "euro"
-SearchQuery *euro*
-SearchQuery euro

Please note that all of the above searches, including with and without wildcards, yield the same error message.

I've done heavy searching online for 'search-mailbox "search failed on mailbox"' and such with no applicable results.

What am I missing?
ASKER CERTIFIED SOLUTION
Avatar of MegaNuk3
MegaNuk3
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KeyPlastics

ASKER

If the raw PowerShell error is useful:

Search Failed on mailbox 'local\USER\a702b7cd-1921-4f96-9534-76ad00d719a1'. If the search query used short words with wildcard(s) such as pat*, it can result in a large number of words or phrases because all permutations of words starting with "pat" are searched. Make search queries as specific as possible when using wildcards.
    + CategoryInfo          : ReadError: (0:Int32) [Search-Mailbox], SearchMailboxException
    + FullyQualifiedErrorId : 55FCE581,Microsoft.Exchange.Management.Tasks.SearchMailbox



RunspaceId       : 4d606ccd-375a-4cb3-97b2-75581bd19b70
Identity         : local/USER
TargetMailbox    : local/Support
TargetPSTFile    :
Success          : False
TargetFolder     : \Recovery\
ResultItemsCount : 0
ResultItemsSize  : 0 B (0 bytes)
Did you try Test-exchangeSearch?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
And the search is now working. I'm not getting any results, but I think that's my fault.

Thanks, MegaNuk3.
You are going to have to wait a while for the Indexer to finish indexing your databases... You should get a 110 Event when it finishes...

Thanks for the points.
MegaNuk3's troubleshooting step led to the actual problem, a disabled service.
Did you index reset finish and now return results as expected?