The connection stays open until the job ends. You can also use the LdapDisconnect script function to disconnect from the directory server.
The LdapConnect function is used when the connection is not encrypted. The syntax is as follows:
The LdapConnectSsl and
LdapConnectSslCca are used when the connection is encrypted.
LdapConnectSsl uses username and password for authentication, and
LdapConnectSslCca uses a client certificate for authentication. See the online help for more information on these script functions.