How to get more than 97 lines from WMI?

I have the following .VBS script that works, but it only returns the top ± 100 (97) rows of data. How to get a complete 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
+5
source share
2 answers

With a little google search, I found a message from Yoel Arnon (web search says he is an MSMQ guru), WMI MSMQ Provider . In it, he claims that MSMQ performance counters have a limitation that they only provide "the first 97 queues (local and outgoing queues) on your computer."

WMI, , . - , - .

+4

, , MS, 97 , , ... 2 3 ...

Select * from Win32_PerfFormattedData_MSMQ_MSMQQueue

, 97, 97...

Select * from Win32_PerfFormattedData_MSMQ_MSMQQueue 
     where SomeColumn = 'Some Common Value'

Select * from Win32_PerfFormattedData_MSMQ_MSMQQueue 
     where NOT SomeColumn = 'Some Common Value'

194 ... "" 3 , FOR/EACH, - .

+1

All Articles