Commands › Exchange Online

Get-EXOMailbox

Exchange Online ExchangeOnlineManagement Get-*

For more information, see About the Exchange Online PowerShell module. Use the Get-EXOMailbox cmdlet to view mailbox objects and attributes, populate property pages, or supply mailbox information to other tasks.

Quick start script

# Get-EXOMailbox — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Run and inspect
Get-EXOMailbox | Format-List

# 3. Export for evidence / drift tracking
Get-EXOMailbox | Export-Clixml .\EXOMailbox-$(Get-Date -Format yyyyMMdd).xml

Syntax — 2 parameter sets

Identity (Default)

Get-EXOMailbox [[-Identity] <String>]
 [-Archive]
 [-Async]
 [-ExternalDirectoryObjectId <Guid>]
 [-Filter <String>]
 [-GroupMailbox]
 [-InactiveMailboxOnly]
 [-IncludeInactiveMailbox]
 [-MailboxPlan <String>]
 [-Migration]
 [-OrganizationalUnit <String>]
 [-PrimarySmtpAddress <String>]
 [-Properties <String[]>]
 [-PropertySets <PropertySet[]>]
 [-PublicFolder]
 [-RecipientTypeDetails <String[]>]
 [-ResultSize <Unlimited>]
 [-SoftDeletedMailbox]
 [-UserPrincipalName <String>]
 [<CommonParameters>]

Anr

Get-EXOMailbox [-Anr <String>]
 [-Archive]
 [-Async]
 [-Filter <String>]
 [-GroupMailbox]
 [-InactiveMailboxOnly]
 [-IncludeInactiveMailbox]
 [-MailboxPlan <String>]
 [-Migration]
 [-OrganizationalUnit <String>]
 [-Properties <String[]>]
 [-PropertySets <PropertySet[]>]
 [-PublicFolder]
 [-RecipientTypeDetails <String[]>]
 [-ResultSize <Unlimited>]
 [-SoftDeletedMailbox]
 [<CommonParameters>]

Parameters (20)

ParameterTypeRequiredWhat it controls
-Identity String The Identity parameter specifies the mailbox you want to view. For the best performance, we recommend using the following values:
-Anr String The Anr parameter specifies a string on which to perform an ambiguous name resolution (ANR) search. You can specify a partial string and search for objects with an attribute that matches that string. The default...
-Archive SwitchParameter The Archive switch filters the results by mailboxes that have an archive enabled (only mailboxes that have an archive mailbox are returned). You don't need to specify a value with this switch.
-Async SwitchParameter This parameter is reserved for internal Microsoft use.
-ExternalDirectoryObjectId Guid The ExternalDirectoryObjectId parameter identifies the mailbox that you want to view by the ObjectId in Microsoft Entra ID.
-Filter String The Filter parameter uses OPATH syntax to filter the results by the specified properties and values. The search criteria uses the syntax `"Property -ComparisonOperator 'Value'"`.
-GroupMailbox SwitchParameter This parameter is reserved for internal Microsoft use.
-InactiveMailboxOnly SwitchParameter The InactiveMailboxOnly switch specifies whether to return only inactive mailboxes in the results. You don't need to specify a value with this switch.
-IncludeInactiveMailbox SwitchParameter The IncludeInactiveMailbox switch specifies whether to include inactive mailboxes in the results. You don't need to specify a value with this switch.
-MailboxPlan String The MailboxPlan parameter filters the results by mailbox plan. When you use this parameter, only mailboxes that are assigned the specified mailbox plan are returned in the results. You can use any value that uniquely...
-Migration SwitchParameter This parameter is reserved for internal Microsoft use.
-OrganizationalUnit String The OrganizationalUnit parameter filters the results based on the object's location in Active Directory. Only objects that exist in the specified location are returned. Valid input for this parameter is an...
-PrimarySmtpAddress String The PrimarySmtpAddress identifies the mailbox that you want to view by primary SMTP email address (for example, navin@contoso.com).
-Properties String[] The Properties parameter specifies the properties that are returned in the output of this cmdlet. You can specify multiple values separated by commas.
-PropertySets PropertySet[] The PropertySets parameter specifies a logical grouping of properties that are returned in the output of this cmdlet. Valid values are:
-PublicFolder SwitchParameter This parameter is reserved for internal Microsoft use.
-RecipientTypeDetails String[] The RecipientTypeDetails parameter filters the results by the specified mailbox subtype. Valid values are:
-ResultSize Unlimited The ResultSize parameter specifies the maximum number of results to return. If you want to return all requests that match the query, use unlimited for the value of this parameter. The default value is 1000.
-SoftDeletedMailbox SwitchParameter The SoftDeletedMailbox switch is required to return soft-deleted mailboxes in the results. You don't need to specify a value with this switch.
-UserPrincipalName String The UserPrincipalName parameter identifies the mailbox that you want to view by UPN (for example, navin@contoso.onmicrosoft.com).

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.