Bagikan melalui


WmiSmoObject.InvokeMgmtMethod Method (ManagementObject, ManagementOperationObserver, String, array<Object )

Invokes the management method for the referenced object with the specified management object, observer, method name, and parameters.

Namespace:  Microsoft.SqlServer.Management.Smo.Wmi
Assembly:  Microsoft.SqlServer.SqlWmiManagement (in Microsoft.SqlServer.SqlWmiManagement.dll)

Syntax

'Declaration
Protected Sub InvokeMgmtMethod ( _
    mo As ManagementObject, _
    observer As ManagementOperationObserver, _
    methodName As String, _
    parameters As Object() _
)
'Usage
Dim mo As ManagementObject 
Dim observer As ManagementOperationObserver 
Dim methodName As String 
Dim parameters As Object()

Me.InvokeMgmtMethod(mo, observer, _
    methodName, parameters)
protected void InvokeMgmtMethod(
    ManagementObject mo,
    ManagementOperationObserver observer,
    string methodName,
    Object[] parameters
)
protected:
void InvokeMgmtMethod(
    ManagementObject^ mo, 
    ManagementOperationObserver^ observer, 
    String^ methodName, 
    array<Object^>^ parameters
)
member InvokeMgmtMethod : 
        mo:ManagementObject * 
        observer:ManagementOperationObserver * 
        methodName:string * 
        parameters:Object[] -> unit
protected function InvokeMgmtMethod(
    mo : ManagementObject, 
    observer : ManagementOperationObserver, 
    methodName : String, 
    parameters : Object[]
)

Parameters

  • methodName
    Type: System.String
    A String value that specifies the name of the management method.
  • parameters
    Type: array<System.Object[]
    An Object system object array value that specifies the parameters for the management method.

Examples

Managing Services and Network Settings by Using WMI Provider

See Also

Reference

WmiSmoObject Class

InvokeMgmtMethod Overload

Microsoft.SqlServer.Management.Smo.Wmi Namespace

Other Resources

WMI and SQL Server

Connecting to the SQL Server Database Engine