Shared mailbox inventory
Documentation: Microsoft Learn
Passing -RecipientTypeDetails SharedMailbox to Get-EXOMailbox filters at the service rather than in the pipeline, and -ResultSize Unlimited keeps the full result set.
The script
Script reader
Inspect before you run
Inspect the script below. It does not run in this browser.
Inspection only — no command has run.
Show reference output
Inspect this example’s structure
Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.
Get-EXOMailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited | Select-Object DisplayName,PrimarySmtpAddress- Stage 1Get-EXOMailbox
-RecipientTypeDetails -ResultSize - Stage 2Select-Object
Positional values or no named parameters
How it works
Passing -RecipientTypeDetails SharedMailbox to Get-EXOMailbox filters at the service rather than in the pipeline, and -ResultSize Unlimited keeps the full result set. The projection stays deliberately narrow at display name and primary address.
Adapting it
Pipe the results into Get-EXOMailboxPermission to attach who currently has access to each one, which turns a bare list into something an owner review can work through.
Requirements
ExchangeOnlineManagement module with a Connect-ExchangeOnline session.
If the result is unexpected
A shared mailbox is absent or listed as a user mailbox.
Recipient type may not have changed yet, or the query uses the wrong organization or filter.
- Inspect RecipientTypeDetails for the mailbox and confirm the Exchange connection.
Validate the result
The inventory reflects the returned recipient type and identifies the organization.
Keep the check reliable
Treat conversion requests and confirmed recipient-type state as separate events.