Compliance Search query for *@domain.com (Wildcard) ?

EnterpriseArchitect 4,871 Reputation points
2022-09-28T03:41:57.623+00:00

Using the GUI: https://compliance.microsoft.com/contentsearchv2?viewid=search maybe something like:
245336-image.png

May I know what's the command in PowerShell?

New-ComplianceSearch -Name $SearchIdentity -ExchangeLocation All -ContentMatchQuery 'sender:"*@domain.com"   

Because I received this error:
245337-image.png

Thank you in advance.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,824 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,243 questions
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,388 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,406 questions
0 comments No comments
{count} votes

Accepted answer
  1. Vasil Michev 96,836 Reputation points MVP
    2022-09-28T06:12:23.33+00:00

    Remove both the wildcard and the @ sign. Here's an example that only includes emails from specific domain:

    (c:c)(participants:domain.com)(kind=email)  
    New-ComplianceSearch -ContentMatchQuery "(c:c)(participants:domain.com)(kind=email)" -name Domain -ExchangeLocation All  
    

0 additional answers

Sort by: Most helpful