Connects to the management provider by using the specified server path and user credentials. Namespace: Microsoft.ConfigurationManagement.ManagementProvider
Assembly: Microsoft.ConfigurationManagement.ManagementProvider (in microsoft.configurationmanagement.managementprovider.dll)

Usage

Visual Basic
Dim instance As ConnectionManagerBase
Dim configMgrServerPath As String
Dim userName As String
Dim password As String
Dim returnValue As Boolean

returnValue = instance.Connect(configMgrServerPath, userName, password)

Syntax

Visual Basic
Public MustOverride Function Connect ( _
		configMgrServerPath As String, _
		userName As String, _
		password As String _
) As Boolean
C#
public abstract bool Connect (
		string configMgrServerPath,
		string userName,
		string password
)
C++
public:
virtual bool Connect (
		String^ configMgrServerPath, 
		String^ userName, 
		String^ password
) abstract
J#
public abstract boolean Connect (
		String configMgrServerPath, 
		String userName, 
		String password
)
JScript
public abstract function Connect (
		configMgrServerPath : String, 
		userName : String, 
		password : String
) : boolean

Parameters

configMgrServerPath

[in] Path to the Configuration Manager server.

userName

[in] User name.

password

[in] User password.

Return Value

true if the connection is successful; otherwise false.

Remarks

Note
This method is not secure because it requires passwords to be retained in memory.

For information on using this method, see How to Connect to an SMS Provider in Configuration Manager by Using Managed Code.


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2003,Windows Vista

See Also