I have the following .VBS script, which works, but it only returns the top ±100(97) rows of data. How do I get the full list?
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_PerfFormattedData_MSMQ_MSMQQueue",,48)
For Each objItem in colItems
Wscript.Echo objItem.Name & " - " & objItem.MessagesinQueue
Next
With a little googling I found a post by Yoel Arnon (web search says he’s a guru on MSMQ), The MSMQ WMI Provider. In it he states that the MSMQ performance counters have a limitation that they only provide “the first 97 queues (local and outgoing queues) in your computer”.
In the same post he provides a link to a new WMI provider he developed to overcome that limitation plus some others, as well as an email address for contact info. The post is three years old but the file is still available for download.