Thursday, February 21, 2013

Delete ALL SMTP Queues In Exchange 2010


---------------------------------------------------------------------------------------
Delete ALL SMTP Queues In Exchange 2010

Scenario:
Al of a sudden you have figured out there are thousands of messages are queued up on your Edge server and you have identified all these messages are spam etc.
image
End goal:
you need to delete all mails within the queue folder as quick as possible
On the Edge Server  Stop Transport Service


Get-Service MsExc*
image

Get-Service MsExc* |FL
image
image

Get-Service MsexchangeTransport

image

Stop-Service MsExchangeTransport
image

Start-Service MsExchangeTransport

once this is done drill down to this directory
image

Select everything and delete them
image

Once you re-start the transport service , the required files will be put in there and all queues will be cleared out

image

This is quick and dirty way of dealing with un-wanted mails if there are mails in the queues which you have business purpose you can be more sophisticated with this PS command

No comments: