Create method of the MSFT_SmbConnection class

Establishes a connection to an SMB server.

Syntax

uint32 Create(
  [in]  string             LocalPath,
  [in]  string             RemotePath,
  [in]  string             UserName,
  [in]  string             Password,
  [in]  boolean            Persistent,
  [in]  boolean            SaveCredentials,
  [in]  boolean            HomeFolder,
  [out] MSFT_SmbConnection CreatedConnection
);

Parameters

LocalPath [in]

The local path to which the remote share will be mapped.

RemotePath [in]

The path of the remote share to which a connection will be established.

UserName [in]

The user name that will be used to establish the connection.

Password [in]

The password that will be used to establish the connection.

Persistent [in]

Controls whether the connection will be persistent.

SaveCredentials [in]

Determines whether or not credentials are saved and used when a mapping is created against the same server.

HomeFolder [in]

Controls whether the connection will be made to the user s home folder.

CreatedConnection [out]

This parameter returns the MSFT_SmbConnection object created with this call.

Requirements

Minimum supported client
Windows 8
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\Smb
MOF
SmbWmiV2.mof
DLL
SmbWmiV2.dll

See also

MSFT_SmbConnection