How to access M365 group mailbox and Mail enabled security groups mailboxes, Public folder mailboxes via PowerShell as admin on Exchange online?

Mytoast Admin 185 Reputation points
2024-06-26T16:19:29.2833333+00:00

How to access M365 group mailbox and Mail enabled security groups mailboxes, Public folder mailboxes via PowerShell as admin on Exchange online? as I have tried different cmdlets and those are not working for accessing but those are for searching the mailbox and it did not work at all?

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
4,197 questions
Microsoft Exchange Online
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,334 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce Jing-MSFT 2,070 Reputation points Microsoft Vendor
    2024-06-27T07:06:32.9333333+00:00

    Hi,@Mytoast Admin

    Thanks for posting your question in the Microsoft Q&A forum.

    You want to access M365 group mailboxes, mail-enabled security group mailboxes, and public folder mailboxes through PowerShell. What information do you want to check in your mailbox?

    The following is the cmdlet for querying basic mailbox information.

    1. Returns information about all Microsoft 365 groups, display names, email addresses,Owners and Privacy.

    Get-UnifiedGroup | Format-List DisplayName,EmailAddresses,ManagedBy,AccessType

    User's image

    2. This example show the members of the Microsoft 365 Group named Group2.

    Get-UnifiedGroupLinks -Identity "Group2" -LinkType Members

    User's image

    3. Access the mail-enabled security group mailbox named "Test5/30".

    Get-DistributionGroup -Identity "Test5/30" | Format-List

    User's image

    4. Access the public folder.

    Get-Mailbox -PublicFolder

    User's image

    If my answer is helpful to you, please mark it as the answer so that other users can refer to it. Thank you for your support and understanding.


  2. Bruce Jing-MSFT 2,070 Reputation points Microsoft Vendor
    2024-07-01T02:31:12.36+00:00

    Hi,@Mytoast Admin

    I'm glad to hear from you. I have understood what you are saying.

    Generally speaking, PowerShell cmdlets can be used to manage and view some properties of Exchange mailboxes, but cannot directly view the specific email content in the mailbox.

    If my answer is helpful to you, please mark it as the answer so that other users can refer to it. Thank you for your support and understanding.