'Search-Mailbox'-Cmdlet not available despite being in 'Organization Management'

WurstCase 96 Reputation points
2023-01-09T14:02:07.11+00:00

After connecting to Exchange Online via PowerShell I cannot use the Search-Mailbox-Cmdlt despite being an Admin and member of the 'Organization Management' Role Group. What else could be missing or has the command been removed from Exchange Online?

Exchange Server
Exchange Server
A family of Microsoft client/server messaging and collaboration software.
1,292 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,626 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 105.7K Reputation points MVP
    2023-01-09T15:29:03.697+00:00

    Organization Management does NOT contain all possible roles/cmdlets. To find out which role(s) contain a given cmdlet, use the following syntax:

    Get-ManagementRole -Cmdlet Search-Mailbox  
    

    In this case, you will see that the cmdlet is part of the "Discovery Management" role, in the default configuration that is. Of course, having access to Organizational Management gives you sufficient permissions to make role changes, so you can either add yourself to "Discovery Management" or add a role assignment for the Search-Mailbox cmdlet to the Organizational Management role group.

    0 comments No comments

  2. Jame Xu-MSFT 4,176 Reputation points
    2023-01-10T05:59:44.48+00:00

    Hi @WurstCase , Agree with @Vasil Michev ,you could find the required permissions with the cmdlet, and find the corresponding role group in the documentation: Permissions in Exchange Online 277617-image.png 277755-image.png 277618-image.png


    If an Answer 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.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.