Export (0) Print
Expand All
2 out of 2 rated this helpful - Rate this topic

Get-Mailbox

Applies to: Exchange Server 2010

Topic Last Modified: 2011-03-19

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


Get-Mailbox [-Identity <MailboxIdParameter>] [-Arbitration <SwitchParameter>] [-Archive <SwitchParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope <SwitchParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-ResultSize <Unlimited>] [-SortBy <String>]


Get-Mailbox [-Arbitration <SwitchParameter>] [-Archive <SwitchParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope <SwitchParameter>] [-MailboxPlan <MailboxPlanIdParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-ResultSize <Unlimited>] [-SortBy <String>]


Get-Mailbox [-Arbitration <SwitchParameter>] [-Archive <SwitchParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope <SwitchParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-ResultSize <Unlimited>] [-Server <ServerIdParameter>] [-SortBy <String>]


Get-Mailbox [-Arbitration <SwitchParameter>] [-Archive <SwitchParameter>] [-Credential <PSCredential>] [-Database <DatabaseIdParameter>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope <SwitchParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-ResultSize <Unlimited>] [-SortBy <String>]


Get-Mailbox [-Anr <String>] [-Arbitration <SwitchParameter>] [-Archive <SwitchParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope <SwitchParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-ReadFromDomainController <SwitchParameter>] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-ResultSize <Unlimited>] [-SortBy <String>]

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
  • Server name\database name

If you don't specify the server name, the command searches for the database on the local server.

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.

Identity

Optional

Microsoft.Exchange.Configuration.Tasks.MailboxIdParameter

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

  • GUID
  • Distinguished name (DN)
  • 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 is available only in the Outlook Live service.

The MailboxPlan parameter specifies a mailbox plan for the mailbox.

Organization

Optional

Microsoft.Exchange.Configuration.Tasks.OrganizationIdParameter

The Organization parameter is reserved for internal Microsoft use.

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.

Bb123685.note(en-us,EXCHG.140).gifNote:
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 ConferenceRoomMailbox, whereas a user mailbox has RecipientTypeDetails set to UserMailbox.

You can select from the following values:

  • ArbitrationMailbox
  • ConferenceRoomMailbox
  • Contact
  • DiscoveryMailbox
  • DynamicDistributionGroup
  • EquipmentMailbox
  • ExternalManagedContact
  • ExternalManagedDistributionGroup
  • LegacyMailbox
  • LinkedMailbox
  • MailboxPlan
  • MailContact
  • MailForestContact
  • MailNonUniversalGroup
  • MailUniversalDistributionGroup
  • MailUniversalSecurityGroup
  • MailUser
  • PublicFolder
  • RoleGroup
  • RoomList
  • RoomMailbox
  • SharedMailbox
  • SystemAttendantMailbox
  • SystemMailbox
  • User
  • UserMailbox

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.

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.

Bb123685.note(en-us,EXCHG.140).gifNote:
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" entry in the Mailbox Permissions topic.

Error Description

 

 

Exceptions Description

 

 

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

Get-Mailbox -ResultSize unlimited

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

Get-Mailbox -OrganizationalUnit Users

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 Cletus, and Christa Geller.

Get-Mailbox -Anr Chr -DomainController DC01

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

Get-Mailbox -Identity Chris -Archive
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.