question

dshumov avatar image
0 Votes"
dshumov asked ·

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

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+
Machine
Machine +

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



not-supported
10 |1000 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.

1 Answer

LeonLaude avatar image
0 Votes"
LeonLaude answered ·

Hi,

Q&A currently supports the products listed over here https://docs.microsoft.com/en-us/answers/products (more to be added later on).

You can reach the experts in the dedicated Microsoft Exchange forum over here:
https://social.technet.microsoft.com/Forums/en-us/home?category=exchangeserver

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

Best regards,
Leon

·
10 |1000 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.