How do I write a request to search for emails in Exchange?

Dmitry Shumov 1 Reputation point

Colleagues, we need help with PowerShell for Exchange:
Trying to search for and then delete mail within the mail system.
This is a very basic task, but has been made more difficult by the fact that the body of the e-mail I am searching for has a "+" character in the text.

For example:
Get-Mailbox -Identity "user" | Search-Mailbox -SearchQuery body: 'Машина+' -EstimateResultOnly | export-csv -Delimiter ";" -encoding UTF8 C:\temp\test.csv
You need the right syntax for the team that searches the mailbox for content, given that the search query has a "+" sign.

There are letters with text in the box:
Machine +

Of these, for example, you only need to find
And in a separate search.
"Machine +"

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
25,560 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Laude 85,151 Reputation points


    Q&A currently supports the products listed over here (more to be added later on).

    You can reach the experts in the dedicated Microsoft Exchange forum over here:

    (Please don't forget to mark helpful replies as answer)

    Best regards,