WMIConn Constructors

Definition

Initializes a new instance of the WMIConn class.

Overloads

WMIConn()

Initializes a new instance of the WMIConn class.

WMIConn(String, String)

Initializes a new instance of the WMIConn class, initializing the WMI server name and namespace.

WMIConn(Boolean, String, String)

Initializes a new instance of the WMIConn class, initializing the authentication mode, user name, and password.

WMIConn(Boolean, String, String, String, String)

Initializes a new instance of the WMIConn class, initializing the authentication mode, user name, password, server, and namespace.

WMIConn()

Initializes a new instance of the WMIConn class.

public:
 WMIConn();
public WMIConn ();
Public Sub New ()

Examples

The following code example adds a WMI connection to a package, and sets the ServerName, Namespace, and UseWindowsAuth properties.

ConnectionManager WmiConn = pkg.Connections.Add("WMI");  
DtsProperty prop = WmiConn.Properties["ServerName"];  
prop.SetValue(WmiConn, @"\\localhost");  
WmiConn.Properties["Namespace"].SetValue(WmiConn, @"\root\myfolder");  
WmiConn.Properties["UseWindowsAuth"].SetValue(WmiConn, true);  
Dim WmiConn As ConnectionManager =  pkg.Connections.Add("WMI")   
Dim prop As DtsProperty =  WmiConn.Properties("ServerName")   
prop.SetValue(WmiConn, "\\localhost")  
WmiConn.Properties("Namespace").SetValue(WmiConn, "\root\myfolder")  
WmiConn.Properties("UseWindowsAuth").SetValue(WmiConn, True)  

Applies to

WMIConn(String, String)

Initializes a new instance of the WMIConn class, initializing the WMI server name and namespace.

public:
 WMIConn(System::String ^ ServerName, System::String ^ Namespace);
public WMIConn (string ServerName, string Namespace);
new Microsoft.SqlServer.Dts.ManagedConnections.WMIConn : string * string -> Microsoft.SqlServer.Dts.ManagedConnections.WMIConn
Public Sub New (ServerName As String, Namespace As String)

Parameters

ServerName
String

The name of the server to connect to as a WMI connection.

Namespace
String

The namespace that the connection manager uses.

Applies to

WMIConn(Boolean, String, String)

Initializes a new instance of the WMIConn class, initializing the authentication mode, user name, and password.

public:
 WMIConn(bool bUseNtAuth, System::String ^ UserName, System::String ^ Password);
public WMIConn (bool bUseNtAuth, string UserName, string Password);
new Microsoft.SqlServer.Dts.ManagedConnections.WMIConn : bool * string * string -> Microsoft.SqlServer.Dts.ManagedConnections.WMIConn
Public Sub New (bUseNtAuth As Boolean, UserName As String, Password As String)

Parameters

bUseNtAuth
Boolean

A Boolean that specifies whether the connection manager uses Windows Authentication. true if Windows Authentication is used.

UserName
String

The user name that the connection manager uses.

Password
String

The password that the connection manager uses.

Applies to

WMIConn(Boolean, String, String, String, String)

Initializes a new instance of the WMIConn class, initializing the authentication mode, user name, password, server, and namespace.

public:
 WMIConn(bool bUseNtAuth, System::String ^ UserName, System::String ^ Password, System::String ^ ServerName, System::String ^ Namespace);
public WMIConn (bool bUseNtAuth, string UserName, string Password, string ServerName, string Namespace);
new Microsoft.SqlServer.Dts.ManagedConnections.WMIConn : bool * string * string * string * string -> Microsoft.SqlServer.Dts.ManagedConnections.WMIConn
Public Sub New (bUseNtAuth As Boolean, UserName As String, Password As String, ServerName As String, Namespace As String)

Parameters

bUseNtAuth
Boolean

A Boolean that specifies whether the connection manager uses Windows Authentication. true if Windows Authentication is used.

UserName
String

The user name that the connection manager uses.

Password
String

The password that the connection manager uses.

ServerName
String

The name of the server to connect to as a WMI connection.

Namespace
String

The namespace that the connection manager uses.

Applies to