Unable to Run the command New-ComplainceSearch

System Admin - Exch 60 Reputation points
2024-04-08T22:49:26.01+00:00

Hello,

We have Exchange 2019 DAG, for the some requirement we are trying to execute the ComplianceSearch command but get the below result

New-ComplianceSearch : The term 'New-ComplianceSearch' is not recognized as the name of a cmdlet, function, script

file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct

and try again.

the user is already a member of Organization Management Group.

Please advice.

Thanks

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,355 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 95,581 Reputation points MVP
    2024-04-09T07:33:20.7066667+00:00

    By default the New-ComplianceSearch cmdlet is part of the Mailbox Search role, which is NOT assigned to the Organization Management Role group. So make sure your user is assigned to a role which does contain the cmdlet definition. You can use the following:

    Get-ManagementRole -Cmdlet New-ComplianceSearch
    

    Then for each role returned, check the assignments via Get-ManagementRoleAssignment.

    0 comments No comments

  2. Bruce Jing-MSFT 615 Reputation points Microsoft Vendor
    2024-04-09T08:49:31.1866667+00:00

    Hi,

        First of all , according to your description, I assumed that you need to be assigned permissions before you can run this cmdlet. In on-premises Exchange, this cmdlet is available in the Mailbox Search role and this role is assigned only to the Discovery Management role group, you need to add your account to Discovery Management role group.

    Here are of my tips that I hope will help you:

    1. This URL is about how to use New-ComplianceSearch. New-ComplianceSearch(ExchangePowerShell) | Microsoft Learn
    2. The picture below is how to add a user to the Discovery Management role group. A screenshot of a web pageDescription automatically generated
    3. The picture below is interface of the Discovery Management. User's image
    0 comments No comments