 <p>McDowell is right, but note that you can get rid of prefix and start mode checks in your loop if you make them part of the WMI query:</p> <blockquote> <p>SELECT * FROM Win32_Service WHERE Name LIKE 'TTTT%' AND StartMode = 'Manual'</p> </blockquote> <p>Using this query, your script could look like this:</p> <pre><code>var strComputer = "."; var oWMI = GetObject("winmgmts://" + strComputer + "/root/CIMV2"); var colServices = oWMI.ExecQuery("SELECT * FROM Win32_Service WHERE Name LIKE 'TTTT%' AND StartMode = 'Manual'"); var enumServices = new Enumerator(colServices); for(; !enumServices.atEnd(); enumServices.moveNext()) { var oService = enumServices.item(); WScript.Echo(oService.Name); } </code></pre>