Export (0) Print
Expand All
Expand Minimize

Get-Mailbox

 

Applies to: Exchange Server 2013, Exchange Online

Topic Last Modified: 2014-04-04

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>] [-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 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 Hess, 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

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

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

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.

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 parameter specifies whether to return information about the recipient's archive mailbox.

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

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

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

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

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.

InactiveMailboxOnly

Optional

System.Management.Automation.SwitchParameter

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

The InactiveMailboxOnly parameter specifies the command to return only inactive mailboxes. An inactive mailbox is a mailbox that has been removed or soft-deleted. An inactive mailbox can be recovered for up to 30 days after it's removed.

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

IncludeInactiveMailbox

Optional

System.Management.Automation.SwitchParameter

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

The IncludeInactiveMailbox parameter specifies the command to return both active and inactive mailboxes. An inactive mailbox is a mailbox that has been removed or soft-deleted. An inactive mailbox can be recovered for up to 30 days after it's removed.

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

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 parameter specifies a list of mailboxes that have a value of MonitoringMailbox for the RecipientTypeDetails property. 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.

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 parameter specifies that the mailbox is a public folder mailbox. Public folder mailboxes are specially designed mailboxes to store the hierarchy and content of public folders. This parameter is required to display information about a public folder mailbox.

ReadFromDomainController

Optional

System.Management.Automation.SwitchParameter

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

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.

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

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

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

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

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.

SoftDeletedMailbox

Optional

System.Management.Automation.SwitchParameter

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

The SoftDeletedMailbox parameter specifies a list of deleted mailboxes that were deleted within the last 30 days.

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.

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:
© 2014 Microsoft