Export (0) Print
Expand All

SWbemObject.Methods_ property

The Methods_ property of the SWbemObject object returns an SWbemMethodSet object that is a collection of the methods for the current class or instance. This property is read-only.

For an explanation of this syntax, see Document Conventions for the Scripting API.

This property is read-only.

Syntax


SWbemObject.Methods_ As Object

Property value

Examples

The following code sample, taken from the TechNet Gallery, describes how to list all methods of a class.


strComputer = "." 
strNameSpace = "root\cimv2" 
strClass = "Win32_Service" 
  
Set objClass = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _  
    strComputer & "\" & strNameSpace & ":" & strClass) 
  
WScript.Echo strClass & " Class Methods" 
WScript.Echo "---------------------------" 
  
For Each objClassMethod In objClass.Methods_ 
    WScript.Echo objClassMethod.Name 
Next 

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2003

Type library

Wbemdisp.tlb

DLL

Wbemdisp.dll

 

 

Show:
© 2014 Microsoft