Remove Messages from Queues

 

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

You can remove one or more messages that are in a queue on a computer that has the Microsoft Exchange Server 2010 Hub Transport server role or the Edge Transport server role installed. A message that's being sent to multiple recipients might be located in more than one queue. To remove a message from more than one queue in a single operation, you must use a filter.

You can select whether to send a non-delivery report (NDR) when you remove messages from a queue. You can't remove a message from the Submission queue.

Looking for other management tasks related to managing transport queues? Check out Managing Transport Queues.

Use the EMC to remove messages from queues

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Queues" entry in the Transport Permissions topic.

  1. In the console tree, click Toolbox.

  2. In the result pane, click Queue Viewer.

  3. In the action pane, click Open Tool.

  4. In Queue Viewer, click the Messages tab. A list of all messages on the server to which you're connected is displayed. To adjust the action to a single queue, click the Queues tab, double-click the queue name, and then click the Server\Queue tab that appears.

  5. Select one or more messages from the list, right-click, and then select Remove Messages (with NDR) or Remove Messages (without NDR). A dialog box appears that confirms the selected action and displays, Do you want to continue? Click Yes.

  6. To remove all messages from a particular queue, click the Queues tab. Select a queue, right-click, and then select Remove Messages (with NDR) or Remove Messages (without NDR). A dialog box appears that confirms the selected action and displays, Do you want to continue? Click Yes.

    Note

    If you're working with a filtered list, the displayed page may not include all items in the filter. In this case, a prompt appears that displays: This action will affect all items on this page. To expand the scope of this action to include all items in this filter, check the following box before you click OK.

Use the Shell to remove messages from queues

You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the "Queues" entry in the Transport Permissions topic.

To remove messages from queues, use the following syntax.

Remove-Message -Filter {property -operator "value"} -WithNDR <$true | $false>

This example removes messages in the queues that have a subject of "Win Big." This example doesn't send an NDR.

Remove-Message -Filter {Subject -eq "Win Big"} -WithNDR $false

For detailed syntax and parameter information, see Remove-Message.

 © 2010 Microsoft Corporation. All rights reserved.