2

我正在尝试使用 VBScript 计算死信队列中的消息数。这是我的代码:

 Option Explicit 
 Dim mqQ, QueueName 
 set mqQ = CreateObject("MSMQ.MSMQManagement") 
 mqQ.Init "localhost", , "DIRECT=OS:localhost\system$;deadletter" 
 wscript.echo mqQ.MessageCount & " messsages"

这是我得到的错误:

 D:\msmq_queue.vbs(4, 1) MSMQManagement: Operations of the type requested (for example, deleting a queue using a direct format name) are not supported for the format name specified. 

我使用这种格式来获取私人消息计数,但是我在死信中收到了这个错误。

4

0 回答 0