Export (0) Print
Expand All

Retry-Queue

 

Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1

Topic Last Modified: 2008-03-11

Use the Retry-Queue cmdlet to force a connection attempt for a queue on a computer that has the Hub Transport server role or the Edge Transport server role installed.


Retry-Queue -Identity <QueueIdentity> [-Confirm [<SwitchParameter>]] [-Resubmit <$true | $false>] [-WhatIf [<SwitchParameter>]]


Retry-Queue -Filter <String> [-Confirm [<SwitchParameter>]] [-Resubmit <$true | $false>] [-Server <ServerIdParameter>] [-WhatIf [<SwitchParameter>]]

The Retry-Queue cmdlet forces a connection attempt for a queue that has a status of Retry. The command establishes a connection to the next hop if it is possible. If a connection is scheduled, this command resets the next retry time for a queue to the current time, and a connection is attempted. If a connection is not established, a new retry time is set. You can cause the queue contents to be resubmitted to the Categorizer by using the Resubmit parameter. You can use this command to retry delivery of messages that are in the Unreachable queue, but you must include the Resubmit parameter.

If you set the Resubmit parameter to $false, the Retry-Queue cmdlet forces a new connection attempt. If you set the Resubmit parameter to $false, the messages in the queue are resubmitted to the categorizer.

noteNote:
You can set the Resubmit parameter to $true only when the status of the remote queue is Retry.

You must use an Identity parameter or a Filter parameter. The Identity parameter and Filter parameter sets are mutually exclusive. You can retry a queue on a remote server by including the server name as part of the Identity parameter or by using the Server parameter with a filter query. If you do not specify a server, the command runs against only the local server.

To run the Retry-Queue cmdlet, the account you use must be delegated the following:

  • Exchange Server Administrator role and local Administrators group for the target server

To run the Retry-Queue cmdlet on a computer that has the Edge Transport server role installed, you must log on by using an account that is a member of the local Administrators group on that computer.

For more information about permissions, delegating roles, and the rights that are required to administer Microsoft Exchange Server 2007, see Permission Considerations.

 

Parameter Required Type Description

Filter

Required

System.String

The Filter parameter requires an expression that specifies the property value criteria for the queues that you want to retry. The expression includes a property name that is followed by a comparison operator and value. The following queue properties are valid criteria 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   Enter 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 Simple Mail Transfer Protocol (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 are not expressed as an integer must be enclosed in quotation marks.

Identity

Required

Microsoft.Exchange.Data.QueueViewer.QueueIdentity

Use the Identity parameter to specify the identity of the queue that contains the messages that you want to retry. Enter the queue identity in the form of Server\destination, where destination is a remote domain, mailbox server, or persistent queue name.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm parameter causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm parameter.

Resubmit

Optional

System.Boolean

Use the Resubmit parameter to specify whether the queue contents should be resubmitted to the categorizer before a connection is established. Set the Resubmit parameter to $false to force a new connection attempt. Set the Resubmit parameter to $false to resubmit the messages in the queue to the categorizer.

Server

Optional

Microsoft.Exchange.Configuration.Tasks.ServerIdParameter

Use the Server parameter to specify the name of the server to connect to by using remote procedure call (RPC) that contains the queues that hold the messages that you want to retry. Enter the server name as a host name or a fully qualified domain name (FQDN). If this parameter is not used, the local server is queried.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf parameter instructs the command to simulate the actions that it would take on the object. By using the WhatIf parameter, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf parameter.

 

Error Description

 

 

 

Exceptions Description

 

 

The following example shows how to force a connection attempt for all queues that meet the following criteria:

  • The queues are holding messages for the specified domain.
  • The queues have a status of Retry.
  • The queues are located on the server on which the command is executed.

For more information about how to use the Exchange Management Shell to perform queue viewer tasks, see Using the Exchange Management Shell to Manage Queues.

Retry-Queue -Filter {NextHopDomain -eq "contoso.com" -and Status -eq "retry"}
To ensure that you are reading the most up-to-date information and to find additional Exchange Server 2007 documentation, visit the Exchange Server TechCenter.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft