Purge Queue

Microsoft.MSMQ.10.0.Task.PurgeQueue (Task)

Removes all messages in the Queue.

Element properties:

TargetMicrosoft.MSMQ.10.0.Queues
AccessibilityInternal
CategoryMaintenance
EnabledTrue
RemotableFalse
Timeout300

Member Modules:

ID Module Type TypeId RunAs 
WA WriteAction Microsoft.MSMQ.10.0.PurgeQueue Default

Source Code:

<Task ID="Microsoft.MSMQ.10.0.Task.PurgeQueue" Accessibility="Internal" Enabled="true" Target="Microsoft.MSMQ.10.0.Queues" Timeout="300" Remotable="true">
<Category>Maintenance</Category>
<WriteAction ID="WA" TypeID="Microsoft.MSMQ.10.0.PurgeQueue">
<Computer>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</Computer>
<QueuePath>$Target/Property[Type="Microsoft.MSMQ.10.0.Queue"]/PathName$</QueuePath>
<TimeoutSeconds>300</TimeoutSeconds>
</WriteAction>
</Task>