Export (0) Print
Expand All
Expand Minimize

Get-Mailbox

 

Applies to: Exchange Server 2013, Exchange Online

Topic Last Modified: 2015-01-06

This cmdlet is available in on-premises Exchange Server 2013 and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.

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

For information about the parameter sets in the Syntax section below, see Syntax.

Get-Mailbox [-Identity <MailboxIdParameter>] <COMMON PARAMETERS>
Get-Mailbox [-MailboxPlan <MailboxPlanIdParameter>] <COMMON PARAMETERS>
Get-Mailbox [-Server <ServerIdParameter>] <COMMON PARAMETERS>
Get-Mailbox [-Database <DatabaseIdParameter>] <COMMON PARAMETERS>
Get-Mailbox [-Anr <String>] <COMMON PARAMETERS>
COMMON PARAMETERS: [-AccountPartition <AccountPartitionIdParameter>] [-Arbitration <SwitchParameter>] [-Archive <SwitchParameter>] [-AuditLog <SwitchParameter>] [-AuxMailbox <SwitchParameter>] [-Credential <PSCredential>] [-DomainController <Fqdn>] [-Filter <String>] [-IgnoreDefaultScope <SwitchParameter>] [-InactiveMailboxOnly <SwitchParameter>] [-IncludeInactiveMailbox <SwitchParameter>] [-IncludeSoftDeletedMailbox <SwitchParameter>] [-Monitoring <SwitchParameter>] [-Organization <OrganizationIdParameter>] [-OrganizationalUnit <OrganizationalUnitIdParameter>] [-PublicFolder <SwitchParameter>] [-ReadFromDomainController <SwitchParameter>] [-RecipientTypeDetails <RecipientTypeDetails[]>] [-RemoteArchive <SwitchParameter>] [-ResultSize <Unlimited>] [-SoftDeletedMailbox <SwitchParameter>] [-SortBy <String>] [-UsnForReconciliationSearch <Int64>]

This example returns a summary 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" using the information from the domain controller named DC01. This example returns mailboxes for users such as Chris Ashton, Christian Hess, and Christa Geller.

Get-Mailbox -Anr Chr -DomainController DC01

This example returns a summary list of all archive mailboxes on the Mailbox server named Mailbox01.

Get-Mailbox -Archive -Server Mailbox01

This example returns information about the remote archive mailbox for the user ed@contoso.com.

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

The Get-Mailbox cmdlet retrieves the attributes and properties for a mailbox. No parameters are required.

NoteNote:
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 Recipients Permissions topic.

 

Parameter Required Type Description

AccountPartition

Optional

Microsoft.Exchange.Configuration.Tasks.AccountPartitionIdParameter

This parameter is reserved for internal Microsoft use.

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

This parameter is available only in on-premises Exchange 2013.

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 switch specifies that the command returns only archive mailboxes. This switch is required to display information about archive mailboxes.

AuditLog

Optional

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

AuxMailbox

Optional

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

Credential

Optional

System.Management.Automation.PSCredential

This parameter is available only in on-premises Exchange 2013.

The Credential parameter specifies the user name and password that's used to run this command. Typically, you use this parameter in scripts or when you need to provide different credentials that have the required permissions.

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

This parameter is available only in on-premises Exchange 2013.

The Database parameter specifies the database that contains the mailboxes that you want to view. You can any value that uniquely identifies the database. For example:

  • GUID

  • Database name

You can't use this parameter with the Filter parameter.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

This parameter is available only in on-premises Exchange 2013.

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 specifies the mailbox that you want to view. You can use any value that uniquely identifies the mailbox.

For example:

  • Alias

  • Distinguished name (DN)

  • GUID

  • Name

  • Display name

  • LegacyExchangeDN

  • Email address

IgnoreDefaultScope

Optional

System.Management.Automation.SwitchParameter

This parameter is available only in on-premises Exchange 2013.

The IgnoreDefaultScope switch tells the command to ignore the default recipient scope setting for the Exchange Management Shell session, and to use the entire forest as the scope. This allows the command to access Active Directory objects that aren't currently available in the default scope.

Using the IgnoreDefaultScope switch 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.

InactiveMailboxOnly

Optional

System.Management.Automation.SwitchParameter

This parameter is available only in the cloud-based service.

The InactiveMailboxOnly switch specifies that the command returns only inactive mailboxes. An inactive mailbox is a mailbox that's placed on Litigation Hold or In-Place Hold before it’s soft-deleted. The contents of an inactive mailbox are preserved until the hold is removed.

IncludeInactiveMailbox

Optional

System.Management.Automation.SwitchParameter

This parameter is available only in the cloud-based service.

The IncludeInactiveMailbox switch specifies that the command returns both active and inactive mailboxes. An inactive mailbox is a mailbox that's placed on Litigation Hold or In-Place Hold before it’s soft-deleted. The contents of an inactive mailbox are preserved until the hold is removed.

IncludeSoftDeletedMailbox

Optional

System.Management.Automation.SwitchParameter

This parameter is reserved for internal Microsoft use.

MailboxPlan

Optional

Microsoft.Exchange.Configuration.Tasks.MailboxPlanIdParameter

This parameter is available only in the cloud-based service.

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.

Monitoring

Optional

System.Management.Automation.SwitchParameter

This parameter is available only in on-premises Exchange 2013.

The Monitoring switch specifies that the command returns only monitoring mailboxes. Monitoring mailboxes are associated with managed availability and the Exchange Health Manager service, and have a RecipientTypeDetails property value of MonitoringMailbox.. Two monitoring mailboxes are automatically created for each mailbox database in your organization: one for monitoring the health of public folders and one for monitoring the health of site mailboxes.

This switch is required to display information about monitoring mailboxes.

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.

PublicFolder

Optional

System.Management.Automation.SwitchParameter

The PublicFolder switch specifies that the command returns only public folder mailboxes. Public folder mailboxes are specially designed mailboxes that store the hierarchy and content of public folders. This switch is required to display information about public folder mailboxes.

ReadFromDomainController

Optional

System.Management.Automation.SwitchParameter

This parameter is available only in on-premises Exchange 2013.

The ReadFromDomainController switch specifies that information should be read from a domain controller in the user's domain. If you run the command Set-AdServerSettings -ViewEntireForest $true to include all objects in the forest and you don't use the ReadFromDomainController switch, it's possible that information will be read from a global catalog that has outdated information. When you use the ReadFromDomainController switch, multiple reads might be necessary to get the information. You don't have to specify a value with this switch.

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

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 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:

  • DiscoveryMailbox

  • EquipmentMailbox

  • LegacyMailbox

  • LinkedMailbox

  • RoomMailbox

  • SharedMailbox

  • UserMailbox

RemoteArchive

Optional

System.Management.Automation.SwitchParameter

This parameter is available only in on-premises Exchange 2013.

The RemoteArchive switch specifies that the command returns only remote archive mailboxes. Remote archive mailboxes exist in the cloud-based service. This switch is required to display information about remote archive mailboxes.

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

ResultSize

Optional

Microsoft.Exchange.Data.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.

Server

Optional

Microsoft.Exchange.Configuration.Tasks.ServerIdParameter

This parameter is available only in on-premises Exchange 2013.

The Server parameter specifies the Exchange server on which you want to run this command. You can use any value that uniquely identifies the server. For example:

  • Name

  • FQDN

  • Distinguished name (DN)

  • Exchange Legacy DN

If you don't use the Server parameter, the command is run on the local server.

SoftDeletedMailbox

Optional

System.Management.Automation.SwitchParameter

This parameter is available only in the cloud-based service.

The SoftDeletedMailbox switch specifies that the command returns only soft-deleted mailboxes. Soft-deleted mailboxes are deleted mailboxes that are still recoverable. This switch is required to display information about soft-deleted mailboxes.

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. The results are sorted in ascending order.

You can sort by the following attributes:

  • Alias

  • DisplayName

  • Name

UsnForReconciliationSearch

Optional

System.Int64

This parameter is reserved for internal Microsoft use.

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.

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.

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft