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.
この形式を使用してプライベート メッセージ数を取得していますが、このエラーはデッド レターで表示されます。