'========================================================================== ' ' ' NAME: ' ' AUTHOR: Ed Wilson , MS ' DATE : 4/18/2006 ' VER : 1.0 ' COMMENT: '1.Properties_ returns a SWbemPropertySet object -- a collection '2.It has a count property that tells how many items are in it. '3.By connecting directly to the class, we return a SWbemObjectEx object ... '4.Not a the swbemservices object normally returned by the moniker. '========================================================================== Option Explicit 'On Error Resume Next dim strComputer 'Name Of target computer dim wmiNS 'WMI Namespace that contains class dim wmiQuery 'Simply the name of the class dim objWMIService 'Connection to WMI Namespace AND Class dim objItem 'Item in the collection of properties strComputer = "." wmiNS = "\root\cimv2" wmiQuery = ":win32_service" Set objWMIService = GetObject("winmgmts:\\" & strComputer & _ wmiNS & wmiQuery) WScript.Echo wmiQuery & vbTab & " has " & _ objWMIService.Properties_.count & " Properties" For Each objItem in objWMIService.Properties_ Wscript.Echo "Property: " & objItem.name Next