question

escpoar-6097 avatar image
0 Votes"
escpoar-6097 asked KyleXu-MSFT commented

Search-Mailbox subject with symbols

Dear all,
I am facing a problem searching for e-mails with subject containing symbols.I've tried different ways, but it doesn't find anything.

 Search-Mailbox -identity identity -SearchQuery "subject:test:dog/cat" -DeleteContent -Force -Confirm:$false
 Search-Mailbox -identity identity -SearchQuery "subject:'test:dog/cat'" -DeleteContent -Force -Confirm:$false
 Search-Mailbox -identity identity -SearchQuery 'subject:"test:dog/cat"' -DeleteContent -Force -Confirm:$false

Using KQLQuery doesn't help as well.

 $subject = "test:dog/cat"
 $search =  "subject:$subject"
 $KQLQuery =[scriptblock]::create($search)

could someone advice, please?
Thank you


office-exchange-server-administration
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@escpoar-6097
I am writing here to confirm with you any update about this thread now?
If the suggestion below helps, please be free to mark it as an answer for helping more people.

0 Votes 0 ·

1 Answer

KyleXu-MSFT avatar image
0 Votes"
KyleXu-MSFT answered

@escpoar-6097

There doesn't exist issue with the search query:
101486-qa-kyle-10-10-09.png

101526-qa-kyle-10-22-37.png
This issue may related with Exchange index, if your mailboxes hosted on Exchange 2010/2013/2016, you can take step below to rebuild database index:
Stop those two services:
101457-qa-kyle-10-12-35.png

Delete "XXXXXX.Single" folder from database path:
101535-qa-kyle-10-14-07.png

Restart above two services and search again.

If your mailbox hosted on Exchange 2019 database, try to create a new database and migrate this mailbox to it and search again.


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.



5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.