Can't make any search on mailbox

Jean Carlos Bormanieri 21 Reputation points

I just did an upgrade from Exchange 2010 envinroment to Exchange 2016. The migration process was just fine, all the things are working and no complains.
Until now: I noticied that I can't make any search on any mailbox.
For example, the command:

get-mailbox -Identity user@keyman .com Search-Mailbox -SearchQuery "kind:email AND (received:(<01/01/2018) OR sent:(<01/01/2018))" -DeleteContent -force

always worked fine on Exchange 2010, but now every time an error happen:

WARNING: The Search-Mailbox cmdlet returns up to 10000 results per mailbox if a search query is specified. To return
more than 10000 results, use the New-MailboxSearch cmdlet or the In-Place eDiscovery & Hold console in the Exchange
Administration Center.
WARNING: An unexpected error has occurred and a Watson dump is being generated: The given key was not present in the
The given key was not present in the dictionary.
+ CategoryInfo : NotSpecified: (:) [Search-Mailbox], KeyNotFoundException
+ FullyQualifiedErrorId : System.Collections.Generic.KeyNotFoundException,Microsoft.Exchange.Management.Tasks.Sear
+ PSComputerName :

I switch to New-MailboxSearch cmdlet, but the same thing happen.
Anyone can please help?

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,025 questions
0 comments No comments
{count} votes

Accepted answer
  1. Zhengqi Lou-MSFT 8,856 Reputation points Microsoft Vendor

    Hi @Jean Carlos Bormanieri ,

    I did a test with the command you provided, and the result is the same.
    After double checked this command, i think it is because of the parameter:
    (received:(<01/01/2018) OR sent:(<01/01/2018))
    Seems like the new version Exchange didn't support this format.

    Try using this command and test:

    Get-mailbox -Identity | Search-Mailbox -SearchQuery 'Kind:Email AND Sent<01/01/2018 OR Received<01/01/2018' -DeleteContent -force  

    Message properties and search operators for In-Place eDiscovery


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Jean Carlos Bormanieri 21 Reputation points

    Thankyou so much. Work fine;

    0 comments No comments