[This topic is in progress.]

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

Topic Last Modified: 2011-09-01

Use the Get-Queue cmdlet to view configuration information for queues on a computer that has the Hub Transport server role or the Edge Transport server role installed.

Syntax

Get-Queue [-BookmarkIndex <Int32>] [-BookmarkObject <ExtensibleQueueInfo>] [-Filter <String>] [-IncludeBookmark <$true | $false>] [-ResultSize <Unlimited>] [-ReturnPageInfo <$true | $false>] [-SearchForward <$true | $false>] [-Server <ServerIdParameter>] [-SortOrder <QueueViewerSortOrderEntry[]>]
Get-Queue [-Identity <QueueIdentity>] [-BookmarkIndex <Int32>] [-BookmarkObject <ExtensibleQueueInfo>] [-IncludeBookmark <$true | $false>] [-ResultSize <Unlimited>] [-ReturnPageInfo <$true | $false>] [-SearchForward <$true | $false>] [-SortOrder <QueueViewerSortOrderEntry[]>]

Detailed Description

The Get-Queue cmdlet displays information about existing queues on a Hub Transport server or an Edge Transport server.

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 "Queues" entry in the Transport Permissions topic.

Parameters

Parameter Required Type Description

Identity

Optional

Microsoft.Exchange.Data.QueueViewer.QueueIdentity

The Identity parameter specifies the identity of the queue that contains the messages that you want to display. Enter the queue identity in the form of Server\destination, where destination is a remote domain, Mailbox server, or persistent queue name.

BookmarkIndex

Optional

System.Int32

The BookmarkIndex parameter specifies the position in the result set where the displayed results start. The value of this parameter is a 1-based index in the total result set. The BookmarkIndex parameter can't be used with the BookmarkObject parameter.

BookmarkObject

Optional

Microsoft.Exchange.Data.QueueViewer.ExtensibleQueueInfo

The BookmarkObject parameter specifies the object in the result set where the displayed results start. The BookmarkObject parameter can't be used with the BookmarkIndex parameter.

Filter

Optional

System.String

The Filter parameter requires an expression that specifies the property value criteria for the queues that you want to display. The expression includes a property name followed by a comparison operator and value. The following queue properties are valid for the Filter parameter:

DeliveryType   The delivery type for this queue as defined by transport. The delivery type must be one of the following values:

DNSConnectorDelivery

NonSMTPGatewayDelivery

SmartHostConnectorDelivery

SmtpRelayWithinAdSitetoEdge

MapiDelivery

SmtpRelayWithinAdSite

SmtpRelaytoRemoteAdSite

SmtpRelaytoTiRg

Undefined

Unreachable

Identity   The queue identity in the form of Server\destination, where destination is a remote domain, Mailbox server, or persistent queue name.

LastError   A text string of the last error recorded for a queue.

LastRetryTime   The time when a connection was last tried for this queue.

MessageCount   The number of items in the queue.

NextHopConnector   The GUID of the connector that was used to create the queue.

NextHopDomain   The next hop domain of the queue, specified as a remote SMTP domain, a server name, the name of an Active Directory site, or a message database (MDB) identifier.

NextRetryTime   The time when a connection will next be tried for this queue.

Status   The status of the queue. Queue status options are Active, Ready, Retry, or Suspended.

You can specify multiple criteria by using the AND comparison operator. Property values that aren't expressed as an integer must be enclosed in quotation marks (").

IncludeBookmark

Optional

System.Boolean

The IncludeBookmark parameter specifies whether to include the bookmark object when the query results are displayed. The IncludeBookmark parameter is valid when it's used with the BookmarkObject or BookmarkIndex parameter. If you don't specify a value for the IncludeBookmark parameter, the default value of $true is used.

ResultSize

Optional

Microsoft.Exchange.Data.Unlimited

The ResultSize parameter specifies the total number of items to display in the result set. The default ResultSize parameter value is set to 1000. The ResultSize parameter supports an unlimited number of results, but Microsoft Exchange limits the result set to 250,000.

ReturnPageInfo

Optional

System.Boolean

The ReturnPageInfo parameter is a hidden parameter. This parameter returns information about the total number of results and the index of the first object of the current page. The default value is $false.

SearchForward

Optional

System.Boolean

The SearchForward parameter specifies whether to search forward or backward in the result set. The default value is $true. This value causes the result page to be calculated forward from either the start of the result set or forward from a bookmark, if specified.

Server

Optional

Microsoft.Exchange.Configuration.Tasks.ServerIdParameter

The Server parameter specifies the name of the server to connect to by using a remote procedure call (RPC) that contains the queues that hold the messages that you want to display. Enter the server name as a host name or a fully qualified domain name (FQDN). If the Server parameter isn't used, the local server is queried.

SortOrder

Optional

Microsoft.Exchange.Data.QueueViewerSortOrderEntry[]

The SortOrder parameter specifies an array of message properties used to control the sort order of the result set. Separate each property by using a comma. Append a plus sign ( + ) symbol to the beginning of the property name to display the results in ascending order. Append a minus sign ( - ) symbol to the beginning of the property name to display the results in descending order. If you don't specify a sort order, the result set is displayed in ascending order by QueueIdentity.

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 displays detailed information for all queues on the Edge Transport server on which the command is run.

Copy Code
Get-Queue | Format-List

EXAMPLE 2

This example lists the queues that contain more than 100 messages.

Copy Code
Get-Queue -Filter {MessageCount -gt 100}

EXAMPLE 3

This example displays detailed information for a specific queue that exists on the server Server1.

Copy Code
Get-Queue -Identity Server1\contoso.com | Format-List