Take a look on MSMQAdm Utility
Tasks administered through the utility programs include the following:
- Browsing local queues
- Purging messages
- Deleting individual messages
- Stopping and starting MSMQ service
- Connecting and disconnecting from the network
Don't forget about powershell, take a look on PowerShell Community Extensions
Update
Open powershell and write line by line
[Reflection.Assembly]::LoadWithPartialName("System.Messaging")
$queueName = '.\Private$\testQueue'
$queue = new-object -TypeName System.Messaging.MessageQueue -ArgumentList $queueName
$queue.Purge()
Call powershell from cmd
- Create txt file.
- Insert all lines
- Change file extension on "ps1"
The easiest way call script from cmd.
powershell.exe -executionpolicy Unrestricted C:\purgemsmq.ps1