![]() Loading |
VBScript |
JavaScript |
Powershell |
Search Options: List All the Properties and Methods of the Win32 Classes
|
||
' Description: Returns the properties and methods for all the WMI Win32 classes (for example, Win32_Service, Win32_Process, Win32_NTEventLog, etc.).
strComputer = "." Set objWMIService=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\cimv2") For Each objclass in objWMIService.SubclassesOf() intCounter=0 If Left(objClass.Path_.Class,5) = "Win32" Then For Each Qualifier in objClass.Qualifiers_ If UCase(Trim(Qualifier.Name)) = "ASSOCIATION" Then intCounter = 1 End If Next If x = 0 Then strComputer = "." Set objWMIService = GetObject _ ("winmgmts:{impersonationLevel=impersonate}!\\" & _ strComputer & "\root\cimv2") Set strClass = objWMIService.Get(objClass.Path_.Class) Wscript.Echo "PROPERTIES:" For each strItem in strClass.properties_ Wscript.Echo objClass.Path_.Class & vbTab & strItem.name Next Wscript.Echo "METHODS:" For Each strItem in strClass.methods_ Wscript.Echo objClass.Path_.Class & vbTab & strItem.name Next End If End If Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |