Can't make any search on mailbox

Jean Carlos Bormanieri 21 Reputation points
2021-02-15T14:28:50.117+00:00

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
dictionary.
The given key was not present in the dictionary.
+ CategoryInfo : NotSpecified: (:) [Search-Mailbox], KeyNotFoundException
+ FullyQualifiedErrorId : System.Collections.Generic.KeyNotFoundException,Microsoft.Exchange.Management.Tasks.Sear
chMailbox
+ PSComputerName : serv-xxx.domain.com

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,707 questions
0 comments No comments
{count} votes

Accepted answer
  1. Xzsssss 8,881 Reputation points Microsoft Vendor
    2021-02-16T07:07:34.94+00:00

    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 user@domain.com | 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

    68574-image.png
    Regards,
    Lou


    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
    2021-02-16T11:28:35.887+00:00

    Thankyou so much. Work fine;

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.