共用方式為


WmiSmoObject.InvokeMgmtMethod 方法 (ManagementObject, String, array<Object )

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

命名空間:  Microsoft.SqlServer.Management.Smo.Wmi
組件:  Microsoft.SqlServer.SqlWmiManagement (在 Microsoft.SqlServer.SqlWmiManagement.dll 中)

語法

'宣告
Protected Sub InvokeMgmtMethod ( _
    mo As ManagementObject, _
    methodName As String, _
    parameters As Object() _
)
'用途
Dim mo As ManagementObject 
Dim methodName As String 
Dim parameters As Object()

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

參數

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

範例

使用 WMI 提供者管理服務和網路設定

請參閱

參考

WmiSmoObject 類別

InvokeMgmtMethod 多載

Microsoft.SqlServer.Management.Smo.Wmi 命名空間

其他資源

WMI and SQL Server

連接到 SQL Server Database Engine