Jump to content

Recommended Posts

Posted

Looking to do something like this, but in autoit

https://docs.microsoft.com/en-us/dotnet/api/system.messaging.messagequeue.getprivatequeuesbymachine?view=netframework-4.8

 

I also found and modified this to work with a single queue, but I have a need to return counts for all queues.

 

For $x=0 to UBound ($Array) -1

Global $Server = $Array[$x]
Global $sMsmqQue = "awsmartgroupevent"
Global $oMSMQ = ObjCreate("MSMQ.MSMQManagement")


$oMSMQ.Init($server, "", "DIRECT=OS:" & $server & "\private$\" & $sMsmqQue)
$iMsmqCnt = $oMSMQ.MessageCount
FileWrite ($file,$server & " - " & $iMsmqCnt & @CRLF)
;MsgBox(64, $server, "Current message count is: " & $iMsmqCnt)
Next

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...