Share via


ConnectionManagerBase.Connect Method (String, String, String)

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

'Usage
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

'Declaration
Public MustOverride Function Connect ( _
    configMgrServerPath As String, _
    userName As String, _
    password As String _
) As Boolean
public abstract bool Connect (
    string configMgrServerPath,
    string userName,
    string password
)
public:
virtual bool Connect (
    String^ configMgrServerPath, 
    String^ userName, 
    String^ password
) abstract
public abstract boolean Connect (
    String configMgrServerPath, 
    String userName, 
    String password
)
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

Change History

See Also

Reference

ConnectionManagerBase Class
ConnectionManagerBase Members
Microsoft.ConfigurationManagement.ManagementProvider Namespace

Other Resources

How to Connect to an SMS Provider in Configuration Manager by Using Managed Code