Applies to: Exchange Server 2010 SP3, Exchange Server 2010 SP2

Topic Last Modified: 2012-12-11

Use the Get-Mailbox cmdlet to view mailbox objects and attributes, populate property pages, or supply mailbox information to other tasks.

Syntax

Get-Mailbox [-Identity <MailboxIdParameter>] [-Arbitration <SwitchParameter>] [-Archive <SwitchParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-ForReconciliation <SwitchParameter>] [-IgnoreDefaultScope <SwitchParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-RemoteArchive <SwitchParameter>] [-ResultSize <Unlimited>] [-SortBy <String>]
Get-Mailbox [-Arbitration <SwitchParameter>] [-Archive <SwitchParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-ForReconciliation <SwitchParameter>] [-IgnoreDefaultScope <SwitchParameter>] [-MailboxPlan <MailboxPlanIdParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-RemoteArchive <SwitchParameter>] [-ResultSize <Unlimited>] [-SortBy <String>]
Get-Mailbox [-Arbitration <SwitchParameter>] [-Archive <SwitchParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-ForReconciliation <SwitchParameter>] [-IgnoreDefaultScope <SwitchParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-RemoteArchive <SwitchParameter>] [-ResultSize <Unlimited>] [-Server <ServerIdParameter>] [-SortBy <String>]
Get-Mailbox [-Arbitration <SwitchParameter>] [-Archive <SwitchParameter>] [-Credential <PSCredential>] [-Database <DatabaseIdParameter>] [-DomainController <Fqdn>] [-Filter <String>] [-ForReconciliation <SwitchParameter>] [-IgnoreDefaultScope <SwitchParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-RemoteArchive <SwitchParameter>] [-ResultSize <Unlimited>] [-SortBy <String>]
Get-Mailbox [-Anr <String>] [-Arbitration <SwitchParameter>] [-Archive <SwitchParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-ForReconciliation <SwitchParameter>] [-IgnoreDefaultScope <SwitchParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-RemoteArchive <SwitchParameter>] [-ResultSize <Unlimited>] [-SortBy <String>]

Detailed Description

The Get-Mailbox cmdlet retrieves the attributes and objects for a mailbox. No parameters are required. If the cmdlet is used without a parameter, all mailboxes in the organization are listed.

Note:
To accurately evaluate the current storage quota status using the Get-Mailbox cmdlet, you must look at the UseDatabaseQuotaDefaults property in addition to the ProhibitSendQuota, ProhibitSendReceiveQuota, and IssueWarningQuota properties. A value of True for the UseDatabaseQuotaDefaults property means that the per-mailbox settings are ignored and the mailbox database limits are used. If this property is set to True and the ProhibitSendQuota, ProhibitSendReceiveQuota, and IssueWarningQuota properties are set to unlimited, the mailbox doesn't have unlimited size. Instead, you must reference the mailbox database storage limits to see what the limits for the mailbox are. A value of False for the UseDatabaseQuotaDefaults property means that the per-mailbox settings are used.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Recipient Provisioning Permissions" section in the Mailbox Permissions topic.

Parameters

Parameter Required Type Description

Anr

Optional

System.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 attributes searched are:

  • CommonName (CN)

  • DisplayName

  • FirstName

  • LastName

  • Alias

Arbitration

Optional

System.Management.Automation.SwitchParameter

The Arbitration parameter specifies that the mailbox for which you are executing the command is an arbitration mailbox. Arbitration mailboxes are used for managing approval workflow. For example, an arbitration mailbox is used for handling moderated recipients and distribution group membership approval.

Archive

Optional

System.Management.Automation.SwitchParameter

The Archive parameter specifies whether to return information about the recipient's archive mailbox.

Credential

Optional

System.Management.Automation.PSCredential

The Credential parameter specifies the user name and password to use to access Active Directory.

This parameter requires the creation and passing of a credential object. This credential object is created by using the Get-Credential cmdlet. For more information, see Get-Credential.

Database

Optional

Microsoft.Exchange.Configuration.Tasks.DatabaseIdParameter

The Database parameter specifies the database from which to get the mailbox. You can use the following values:

  • GUID of the database

  • Database name

This parameter can't be used in conjunction with the Filter parameter.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory.

Filter

Optional

System.String

The Filter parameter indicates the OPath filter used to filter recipients.

For more information about the filterable properties, see Filterable Properties for the -Filter Parameter.

ForReconciliation

Optional

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

Identity

Optional

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

The Identity parameter specifies the identity of the mailbox. You can use one of the following values:

  • GUID

  • Distinguished name (DN)

  • Display name

  • Domain\Account

  • User principal name (UPN)

  • LegacyExchangeDN

  • SmtpAddress

  • Alias

IgnoreDefaultScope

Optional

System.Management.Automation.SwitchParameter

The IgnoreDefaultScope parameter instructs the command to ignore the default recipient scope setting for the Exchange Management Shell session and use the entire forest as the scope. This allows the command to access Active Directory objects that aren't currently in the default scope. Using the IgnoreDefaultScope parameter introduces the following restrictions:

  • You can't use the DomainController parameter. The command uses an appropriate global catalog server automatically.

  • You can only use the DN for the Identity parameter. Other forms of identification, such as alias or GUID, aren't accepted.

  • You can't use the OrganizationalUnit and Identity parameters together.

  • You can't use the Credential parameter.

MailboxPlan

Optional

Microsoft.Exchange.Configuration.Tasks.MailboxPlanIdParameter

This parameter applies to objects in the cloud-based service. It isn’t available for on-premises deployments.

This parameter is available for multi-tenant deployments. It isn't available for on-premises deployments. For more information about multi-tenant deployments, see Multi-Tenant Support.

The MailboxPlan parameter specifies the command to return mailboxes associated with this mailbox plan. A mailbox plan specifies the permissions and features available to a mailbox user. The mailbox plan name you provide must be included in the service plan for the organization in which this mailbox belongs. For more information, see Understanding Service Plans and Mailbox Plans.

Organization

Optional

Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter

This parameter is available for multi-tenant deployments. It isn't available for on-premises deployments. For more information about multi-tenant deployments, see Multi-Tenant Support.

The Organization parameter specifies the organization in which you'll perform this action. This parameter doesn't accept wildcard characters, and you must use the exact name of the organization.

OrganizationalUnit

Optional

Microsoft.Exchange.Configuration.Tasks.OrganizationalUnitIdParameter

The OrganizationalUnit parameter specifies an organizational unit (OU) and is used to limit the results. If you use this parameter, you only get mailboxes in the container that you specify. You can use either the OU or the domain name. If you use the OU, you must specify the canonical name of the OU.

ReadFromDomainController

Optional

System.Management.Automation.SwitchParameter

The ReadFromDomainController parameter specifies that the user information is read from a domain controller in the user's domain. If you set the recipient scope to include all recipients in the forest and don't use this parameter, it's possible that the user information is read from a global catalog with outdated information. If you use this parameter, multiple reads might be necessary to get the information.

Note:
By default, the recipient scope is set to the domain that hosts your servers that run Exchange.

RecipientTypeDetails

Optional

Microsoft.Exchange.Data.Directory.Recipient.RecipientTypeDetails[]

The RecipientTypeDetails parameter specifies the type of recipients returned. Recipient types are divided into recipient types and subtypes. Each recipient type contains all common properties for all subtypes. For example, the type UserMailbox represents a user account in Active Directory that has an associated mailbox. Because there are several mailbox types, each mailbox type is identified by the RecipientTypeDetails parameter. For example, a conference room mailbox has RecipientTypeDetails set to RoomMailbox, whereas a user mailbox has RecipientTypeDetails set to UserMailbox.

This parameter accepts the following values:

  • RoomMailbox

  • EquipmentMailbox

  • LegacyMailbox

  • LinkedMailbox

  • UserMailbox

  • DiscoveryMailbox

  • SharedMailbox

RemoteArchive

Optional

System.Management.Automation.SwitchParameter

The RemoteArchive parameter specifies whether to disconnect the remote archive for this mailbox. A remote archive exists in a cloud-based service.

When you use this parameter, you can't use the Archive parameter.

ResultSize

Optional

Microsoft.Exchange.Data.Unlimited

The ResultSize parameter specifies the maximum number of results to return. If you want to return all mailboxes that match the query, use unlimited for the value of this parameter. The default value is 1000.

Server

Optional

Microsoft.Exchange.Configuration.Tasks.ServerIdParameter

The Server parameter specifies an individual server and is used to limit the results. If you use this parameter, you only get mailboxes that reside on the server that you specify. Use the common name of the server that you want to specify.

SortBy

Optional

System.String

The SortBy parameter specifies the attribute by which to sort the results. You can sort by only one attribute at a time. You can sort by the following attributes:

  • Alias

  • Display name

  • Name

The results are sorted in ascending order.

Input Types

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

Return Types

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

Examples

EXAMPLE 1

This example returns a list of all the mailboxes in your organization.

Copy Code
Get-Mailbox -ResultSize unlimited

EXAMPLE 2

This example returns a list of all the mailboxes in your organization in the Users OU.

Copy Code
Get-Mailbox -OrganizationalUnit Users

EXAMPLE 3

This example returns all the mailboxes that resolve from the ambiguous name resolution search on the string "Chr" that are in the domain named DC01. This example returns mailboxes for users such as Chris Ashton, Christian Hess, and Christa Geller.

Copy Code
Get-Mailbox -Anr Chr -DomainController DC01

EXAMPLE 4

This example returns information about the mailbox named Chris, including archive mailbox information.

Copy Code
Get-Mailbox -Identity Chris -Archive

EXAMPLE 5

This example returns information about the mailbox ed@contoso.com, including information about his remote archive mailbox.

Copy Code
Get-Mailbox -Identity ed@contoso.com -RemoteArchive