ICIServer Interface
Use the ICIServer interface to manage the Server and access the Server's attributes.
interface ICIServer : IDispatch
-
GetAdminIPs is a list of all IP addresses assigned to the EFT computer.
-
ListenIP is a deprecated property from previous versions in which EFT's administrative subsystem listened on only one IP address; instead use ListenIPs.
-
CreateAutomationAdmin is almost the same as CreateAdminin that it creates an EFT-managed administrator account. The difference is that an automated administrator’s original password is not reset upon first connection regardless of administrator password policy. An automated administrator account is created only via the API, operates via the API, and does not require an initial password change.
Jump to: A B C D E G H I K L M P R S T U W
See below Dialog Box Equivalents
Members (listed alphabetically)
-
Property ActiveDownloads As Long read-only
Retrieves the number of active downloads.
HRESULT ActiveDownloads([out, retval] LONG* pVal);
Example (VBScript):
MsgBox “Active downloads “ & CStr(oServer.ActiveDownloads)
EFT v6.3 and later
Property ActiveUploads As Long read-only
Retrieves the number of active uploads.
HRESULT ActiveUploads([out, retval] LONG* pVal);
Example (VBScript):
MsgBox “Active uploads “ & CStr(oServer.ActiveUploads)
EFT v6.3 and later
Adds a new profile to use with an ICAP (antivirus and DLP) server.
HRESULT AddContentIntegrityControlProfile([in] IDispatch* pProfile);
EFT 7.0.3 and later
Sub AddIPAccessRule(bstrMask As String, bAllow As Boolean, nRulePos As Long, [bstrReason As String = ""])
Adds allowed or denied IP mask for Remote Administration. (default value and Reason added in EFT v8)
HRESULT AddIPAccessRule( [in] BSTR bstrMask, [in] VARIANT_BOOL bAllow, [in] long nRulePos);
Example (VBScript):
oServer.AddIPAccessRule("1.2.3.4", false, 2)
See also GetIPAccessRules and RemoveIPAccessRule, and the following topics:
- ICIAutobanIPAccessRule Interface
- ICIBannedIP Interface
- ICIIPAccessRule Interface
- ICIManualIPAccessRule Interface
- How Do the IP Access/Ban Methods and Properties Work?
EFT v6.3 and later
For an example using this property, refer to the RetrieveAdminUser script in Script Examples.
See also ICIAdminPermission - Administrator Permission Interface and ICIAdminAccount - Administrator Account Interface.
Retrieves an array of administrator accounts.
HRESULT AdminAccounts([out,retval] VARIANT* pVal);
Example (VBScript):
For Each admin In oServer.AdminAccounts MsgBox admin.Login Next
Example (C#):
object[] accounts = (object[])m_server.AdminAccounts;
EFT v6.3 and later
Property AdminPort As Long
Retrieves or specifies the port used for remote administration connections to administer the Server. You must restart the server to apply any change to the server administrator port.
HRESULT AdminPort([out, retval] long *pVal); HRESULT AdminPort([in] long newVal);
All versions
Property AllowClearCommandChannel As Boolean
Allows or prohibits a clear command channel on the server.
HRESULT AllowClearCommandChannel([out, retval] VARIANT_BOOL *pVal); HRESULT AllowClearCommandChannel([in] VARIANT_BOOL newVal);
Example (VBScript):
oServer.AllowClearCommandChannel = true
EFT v5.0.1 and later
Property AllowRemoteAdministration As Boolean
Allows or prohibits remote administration of the server.
HRESULT AllowRemoteAdministration([out, retval] VARIANT_BOOL *pVal); HRESULT AllowRemoteAdministration([in] VARIANT_BOOL newVal);
All versions
Property AllowUnprotectedDataChannel As Boolean
Allows or prohibits an unprotected data channel on the server for the FTP Protocol.
HRESULT AllowUnprotectedDataChannel([out, retval] VARIANT_BOOL *pVal); HRESULT AllowUnprotectedDataChannel([in] VARIANT_BOOL newVal);
Example (VBScript):
oServer. AllowUnprotectedDataChannel = true
EFT v5.0.1 and later
Applies changes to confirm and set changes you have made. (Any "Set" or "Write" method applies the change made immediately.)
HRESULT ApplyChanges();
All versions; does not apply to HA nodes
Property ARMAuthenticationType As ARMAuthenticationType
For an example using this property, refer to the BackupEx script in Script Examples.
Retrieves or specifies the type of database authentication, SQL or Windows.
HRESULT ARMAuthenticationType([out, retval] ARMAuthenticationType* pVal); HRESULT ARMAuthenticationType([in] ARMAuthenticationType newVal)
Example (VBScript):
Retrieving:
If WindowsAuthentication = oServer.ARMAuthenticationType Then ' some code End If
Specifying:
oServer.ARMAuthenticationType = SQLServerAuthentication
EFT v6.3 and later
Retrieves the database connection status.
HRESULT ARMConnectionStatus([out, retval] VARIANT_BOOL* pVal);
EFT v7.4 and later
Property ARMCommitEventRuleTransferLog As DiagLoggingER
HRESULT ARMCommitEventRuleTransferLog([out, retval] DiagLoggingER *pVal); HRESULT ARMCommitEventRuleTransferLog([in] DiagLoggingER newVal)
EFT v7.4.2 and later
Property ARMDatabaseName As String
For an example using this method, refer to the BackupEx script in Script Examples.
Retrieves or specifies the Auditing and Reporting database name.
HRESULT ARMDatabaseName([out, retval] BSTR *pVal); HRESULT ARMDatabaseName([in] BSTR newVal);
Example (VBScript):
Dim strDBName: strDBName = oServer.ARMDatabaseName WScript.Echo "ARM Database: " & strDBName
All versions
Property ARMDatabaseType As ARMDatabaseType
Retrieves or specifies the database type.
HRESULT ARMDatabaseType([out, retval] ARMDatabaseType* pVal); HRESULT ARMDatabaseType([in] ARMDatabaseType newVal);
Example (VBScript):
Retrieving:
If Oracle = oServer.ARMDatabaseType Then ' some code End If
Specifying:
oServer.ARMDatabaseType = SQLServer
EFT v6.3 and later
Property ARMFailureAuditFolder As String
Retrieves or specifies the folder used for logging ARM audit failures.
HRESULT ARMFailureAuditFolder([out, retval] BSTR* pVal); HRESULT ARMFailureAuditFolder([in] BSTR newVal);
Example (VBScript):
Retrieving:
Auditfolder = oServer.ARMFailureAuditFolder
Specifying:
oServer.ARMFailureAuditFolder = "C:\some_folder"
EFT v6.3 and later
Property ARMFailureEmailList As String
Retrieves or specifies a list of emails that are notified of ARM failure.
HRESULT ARMFailureEmailList([out, retval] BSTR* pVal); HRESULT ARMFailureEmailList([in] BSTR newVal);
Example (VBScript):
strEmailList = oServer.ARMFailureEmailList If strEmailList "" Then strEmailList = strEmailList + "; " End If strEmailList = strEmailList + "NewRecipientName SomeAddratSomeMailServer.com" oServer.ARMFailureEmailList = strEmailList
EFT v6.3 and later
Property ARMHealConnection As Boolean
Enable or disable ARM healing connection mechanism.
HRESULT ARMHealConnection([out,retval] VARIANT_BOOL* pVal); HRESULT ARMHealConnection([in] VARIANT_BOOL newVal);
Example (VBScript):
Retrieving:
If MyServer.ARMHealConnection Then ‘Healing connection mechanism is enabled … End If
Specifying:
MyServer.ARMHealConnection = False ‘Healing connection mechanism have disabled
EFT v7.0 and later
Enable or disable notify on ARM database disconnect by sending an e-mail to the recipients defined on ARMFailureEmailList.
HRESULT ARMNotifyOnDisconnect([out,retval] VARIANT_BOOL* pVal); HRESULT ARMNotifyOnDisconnect([in] VARIANT_BOOL newVal);
Example (VBScript):
Retrieving:
If MyServer.ARMNotifyOnDisconnect Then ‘Notify on ARM database disconnect is enabled … End If
Specifying:
MyServer.ARMNotifyOnDisconnect = False ‘Notify on ARM database disconnect is disabled
EFT v7.0 and later
Enable or disable notify on ARM database reconnect by sending an e-mail to the recipients defined on ARMFailureEmailList.
HRESULT ARMNotifyOnReconnect([out,retval] VARIANT_BOOL* pVal);
HRESULT ARMNotifyOnReconnect([in] VARIANT_BOOL newVal);
Example (VBScript):
Retrieving:
If MyServer.ARMNotifyOnReconnect Then ‘Notify on ARM database Reconnect is enabled … End If
Specifying:
MyServer.ARMNotifyOnReconnect = False ‘Notify on ARM database reconnect have disabled
EFT v7.0 and later
Property ARMPassword As String
For an example using this method, refer to the BackupEx script in Script Examples.
Retrieves or specifies the password for logging in to the ARM Database.
HRESULT ARMPassword([out, retval] BSTR *pVal); HRESULT ARMPassword([in] BSTR newVal);
Example:
Dim strNewPassword: strNewPassword = "newpassword" oServer.ARMPassword = strNewPassword
All versions
Function ARMReconnect() As Boolean
Specify whether ARM should reconnect after disconnection.
HRESULT ARMReconnect([out,retval] VARIANT_BOOL* pVal);
Example (VBScript):
If Not oServer.ARMReconnect() Then MsgBox "Reconnection failed." End If
EFT v6.3 and later
Retrieves or specifies the period to reconnect to the ARM database. If a database error occurs and the ARM healing mechanism is enabled, then EFT tries to reconnect to the database every ARMReconnectPeriod seconds. The ARMReconnectPeriod can be set from 7 to 86400 seconds (24 hours). The default is 7 seconds.
HRESULT ARMReconnectPeriod([out,retval] ULONG* pVal); HRESULT ARMReconnectPeriod([in] ULONG newVal);
Example (VBScript):
Retrieving:
MsgBox “Reconnect period: ” & CStr(MyServer.ARMReconnectPeriod)
Specifying:
MyServer.ARMReconnectPeriod = 60 ‘every one minute
EFT v7.0 and later
Property ARMServerName As String
For an example using this method, refer to the BackupEx script in Script Examples.
Retrieves or specifies the name of the server on which the Auditing and Reporting database is located.
HRESULT ARMServerName([out, retval] BSTR *pVal); HRESULT ARMServerName([in] BSTR newVal);
Example (VBScript):
Dim strServerName: strServerName = oServer.ARMServerName oServer. ARMServerName = "localhost\GlobalSCAPE"
All versions
Property ARMStopAuditingOnError As Boolean
Retrieves or specifies whether ARM should stop auditing when it encounters an error.
HRESULT ARMStopAuditingOnError([out, retval] VARIANT_BOOL* pVal); HRESULT ARMStopAuditingOnError([in] VARIANT_BOOL newVal);
Example (VBScript):
Retrieving:
If oServer.ARMStopAuditingOnError Then ' some code End If
Specifying:
oServer.ARMStopAuditingOnError = True
EFT v6.3 and later
Function ARMTestConnection() As Boolean
For an example using this method, refer to the ARM script in Script Examples.
Retrieves or specifies whether to test the ARM connection.
HRESULT ARMTestConnection([out,retval] VARIANT_BOOL* pVal);
Example (VBScript):
If Not oServer.ARMTestConnection() Then MsgBox "Database is unavailable!" End If
EFT v6.3 and later
Property ARMUserName As String
For an example using this property, refer to the BackupEx script in Script Examples.
Retrieves or specifies the username used to connect to the Auditing and Reporting database.
HRESULT ARMServerName([out, retval] BSTR *pVal); HRESULT ARMServerName([in] BSTR newVal);
Example (VBScript):
Dim strUserName : strUserName = oServer.ARMUserName oServer. ARMUserName = "admin"
All versions
Function Auditor() As CIAudit
Retrieves or specifies log audit information in the Auditing and Reporting Module (ARM) related to the Secure Ad Hoc Transfer module.
HRESULT Auditor([out,retval] ICIAudit** ppAuditor);
EFT v6.0 - 8.1.0.9
Property AutoSave As Boolean
Used for better performance in special cases and available only for COM admin sessions.
When ICIServer::AutoSave is FALSE settings changes do not save in the Transfer Engine (TE) and you have to call ICIServer::ApplyChanges manually.
When ICIServer::AutoSave is TRUE every settings change is saved (usual behavior).
HRESULT AutoSave([out, retval] VARIANT_BOOL *pVal); HRESULT AutoSave([in] VARIANT_BOOL newVal);
Example (VBScript):
Retrieving:
MsgBox "Auto save mode: " & CStr(oServer.AutoSave)
Specifying:
oSFTPServer.AutoSave = FALSE Dim strName strName = "User_ " kBase = 1 kAdd = 100000 For j = kBase To kAdd oSite.CreateUserEx strName+Cstr(j),Cstr(j),0,Cstr(j),Cstr(j),True,False, "Default settings" Next oSFTPServer.AutoSave = TRUE Wscript.echo "Saving Settings..." oSFTPServer.ApplyChanges Wscript.echo "Saved "
EFT v6.2.18 and later; does not apply to HA nodes
Retrieve a list of the Events defined on EFT. Its value is a variant containing the array of ICIEventInfo.
HRESULT AvailableEvents([out, retval] VARIANT* pVal);
Example (VBScript):
For Each event In Server.AvailableEvents MsgBox event.Name & " event is available" Next
EFT v6.1 and later
Property AvailablePGPKeys As Variant read-only
Retrieve a list of EFT’s PGP Keys. Its value is a variant containing the array of ICIPGPKeyInfo
HRESULT AvailablePGPKeys([out, retval]VARIANT* pVal);
Example (VBScript):
For Each key In Server.AvailablePGPKeys MsgBox key.Name & " key is available" Next
EFT v6.1 and later
See also ICIReportInfo - Report Information Interface.
Retrieve a list of the reports available on EFT. Its value is a variant containing the array of the ICIReportInfo.
HRESULT AvailableReports([out, retval] VARIANT* pVal);
Example (VBScript):
For Each report In Server.AvailableReports MsgBox report.Name & " report is available" Next
EFT v6.1 and later
Property AvailableSSHKeys As Variant read-only (Deprecated in v8)
For an example using this property, refer to the SSH script in Script Examples.
Retrieve a list of SSH public keys available for EFT. Its value is a variant containing the array of ICISSHKeyInfo.
HRESULT AvailableSSHKeys([out, retval] VARIANT* pVal);
Example (VBScript):
For Each key In Server.AvailableSSHKeys MsgBox "Key " & key.Name & "(" & key.Fingerprint & ") is available" Next
Example (C#):
keyIdList = (object[])m_server.AvailableSSHKeys;
EFT v6.1 - 7.4.x
Function AvailableSSLVersions() As CISSLVersions
The AvailableSSLVersions property of ICIServer returns an ICISSLVersions object, which is an array of ICISSLVersion objects. The BitFlag property of each ICISSLVersion is the value you would need to include when setting the SSLVersionMask property of ICIServer to enable the use of a particular SSL protocol version.
For example, if you wanted to enable TLS v1, v1.1, and v1.2, the value would be 25:
Protocol Version |
Bitwise value |
TLSv1 |
1 |
TLS v1.1 |
8 |
TLS v1.2 |
16 |
1 + 8 + 16 = 25
EFT v7.1.1 - 7.4.x
Property AverageSpeed As Long read-only
Retrieve the average transfer speed of the server.
HRESULT AverageSpeed([out, retval] LONG* pVal);
Example (VBScirpt):
MsgBox "Average speed is " & CStr(oServer.AverageSpeed) & "KB/s"
EFT v6.3 and later
For an example using this method, refer to the Backup script in Script Examples.
Retrieves or specifies the path at which to save server backup files.
HRESULT BackupServerConfiguration([in] BSTR bstrFilePath);
Example (VBScript):
oServer.BackupServerConfiguration "C:\lastbackup.bak"
EFT v6.3 and later
HRESULT BeginHAUpgrade();
(See also EndHAUpgrade and GetHAUpgradeNodeState)
EFT v8.1 and later
Property CertificateFilePath As String
Retrieves or specifies the path to the server's certificate files.
HRESULT CertificateFilePath([out, retval] BSTR *pVal); HRESULT CertificateFilePath([in] BSTR newVal);
All versions
Sub ChangeAdminPassword(bstrAdminUser As String, bstrNewPassword As String)
Change the password for an administrator account on the server.
HRESULT ChangeAdminPassword([in] BSTR bstrAdminUser,[in] BSTR bstrNewPassword);
Example (VBScript):
oServer.ChangeAdminPassword( "subadmin", "newpassword")
EFT 4.3.4 and later
Property CipherList As String
Refer to "Using Ciphers for Inbound SSL Connections" in the EFT documentation for a complete list of allowed ciphers and how to properly format the cipher string.
Retrieves or specifies the cipher list.
HRESULT CipherList([out, retval] BSTR *pVal); HRESULT CipherList([in] BSTR newVal);
Examples (VBScript):
Dim strCipherList: strCipherList = oServer.CipherList Dim strNewList strNewList = "ALL:!EXPORT:!LOW" SFTPServer.CipherList = strNewList Dim strCipherList: strCipherList = SFTPServer.CipherList WScript.Echo strCipherList
CipherList must be delimited by colon ( : ). For example,
"AES256-SHA:CAMELLIA256-SHA:DES-CBC3-SHA:AES128-SHA:IDEA-CBC-SHA:RC4-MD5"
EFT v5.0.1 and later
Sub Close()
For an example using this method, refer to the Backup script or GetCertInfo script in Script Examples.
Close the COM administrative connection to the server.
HRESULT Close();
All versions
Method used to stop the server service
HRESULT CloseServerService(void);
EFT v8.0.6 and later
Property ConfigurationFilePath As String
Retrieves or specifies the path to the configuration files.
HRESULT ConfigurationFilePath([out, retval] BSTR* pVal); HRESULT ConfigurationFilePath([in] BSTR newVal);
Example (VBScript):
Retrieving:
MsgBox "Server setting folder is " & server. ConfigurationFilePath
Specifying:
oServer.ConfigurationFilePath = "C:\some_folder "oServer.StopServerService("127.0.0.1") oServer.StartServerService("127.0.0.1")
EFT v6.3 and later
Sub Connect(Host As String, nPort As Long, Login As String, Password As String)
For an example using this method, refer to the Backup script or GetCertInfo script in Script Examples.
Connect to the local or remote server as the administrator. (In EFT v6.2 and later, use ConnectEx to connect using an IWA or Windows administrator login.)
HRESULT Connect([in] BSTR Host,[in] long nPort,[in] BSTR Login,[in] BSTR Password);
Example (VBScript):
Dim Server As CIServer 'assumes the SFTPCOMInterface Type Library is referenced by the VB IDE Dim Site As CISite 'instantiates the ISite interface Dim Sites As CISites 'instantiates the ISites interface txtServer = "127.0.0.1" 'local IP address of server txtPort = "1000" 'admin port txtUserName = "Admin" 'admin username txtPassword = "mypass" 'admin password On Error Resume Next 'verify it could connect ok Server.Connect txtServer, txtPort, txtUserName, txtPassword 'now connect using supplied information If Err.Number 0 Then MsgBox "Error connecting to '" & txtServer & ":" & txtPort & "' -- " & Err.Description & " [" & CStr(Err.Number) & "]", vbInformation, "Error" 'all this on one line! End If Set Sites = Server.Sites 'now retrieve the list of sites in the server Set Site = Sites.Item(0) 'Instantiate the first and only, site (note, this script assumes only one site present) 'continue rest of code...
All versions
Property ConnectedUsersNumber As Long read-only
Retrieve the number of users connected to the Server.
HRESULT ConnectedUsersNumber([out, retval] BSTR *pVal);
Example (VBScript):
Dim iConnectedUses: iConnectedUsers = oServer.ConnectedUsersNumber
EFT 3.5.1 and later
Sub ConnectEx(Host As String, nPort As Long, nLoginType As AdminLoginType, Login As String, Password As String)
Log in to EFT using Integrated Windows Authentication (IWA) or Windows administrator login credentials.
HRESULT ConnectEx(/* [in]*/ BSTR Host, /* [in]*/ long nPort, /* [in]*/ AdminLoginType nLoginType, /* [in]*/ BSTR Login, /* [in]*/ BSTR Password);
AdminLoginType
EFTLogin = 0, // With EFT-managed admin login and password (legacy style) IWALogin = 1, // With currently logged user credentials // (Integrated Windows Authentication, IWA; // for AD and local computer accounts)NetLogon = 2 // With Windows login and password // (for AD and local computer accounts)
Examples (VBScript):
IWA:
SFTPServer.ConnectEx "EFTServer", 1100, IWALogin, "", ""
NetLogin:
SFTPServer.ConnectEx "localhost", 1100, 2, txtUserName, txtPassword
Logging in using local computer login or domain login:
//... server.ConnectEx "192.168.0.1", 1100, IWALogin, "", "" //... server.ConnectEx "192.168.0.1", 1100, NetLogon, "PC1\user", "User'sLocalPassword" //... server.ConnectEx "192.168.0.1", 1100, NetLogon, "DM1\user", "User'sDomainPassword"
EFT v6.2 and later
Retrieves a list of Content Integrity Control profiles. (read only)
HRESULT ContentIntegrityControlProfileList([out, retval] VARIANT *pVal);
EFT v7.0.3 and later
Function CreateAdmin(bstrNewAdmin As String, bstrPassword As String, atype As AdminAccountType, vbGroup As Boolean) As Object
For an example using this method, refer to the CreateAdminUser script in Script Examples.
Create an administrator account on EFT.
HRESULT CreateAdmin( [in] BSTR bstrNewAdmin, [in] BSTR bstrPassword, [in] AdminAccountType atype, [in] VARIANT_BOOL vbGroup, [out,retval] IDispatch** pAdminAccount);
Example (VBScript):
Set AdminAccount = server.CreateAdmin("admin", "swordfish", EFTAdmin, False)
Example (C#):
ICIAdminAccount adminUser = (ICIAdminAccount)m_server.CreateAdmin("Test_Administrator", "Tester!1", AdminAccountType.EFTAccount, false);
EFT v6.3 and later
Function CreateAdminID(bstrLogin As String, type As AdminAccountType, bGroup As Boolean) As CIAdminID
ID assigned to the CreateAdmin account.
HRESULT CreateAdminID( [in] BSTR bstrLogin, [in] AdminAccountType type, [in] VARIANT_BOOL bGroup, [out, retval] ICIAdminID** ppVal);
EFT v7.2 and later
Function CreateAutomationAdmin(bstrNewAdmin As String, bstrPassword As String) As Object
Create an automation administrator account. This account does not require a password change, regardless of password security settings; the account is intended for use in an automated system that does not login via the administration interface. (No UI equivalent; for API only.)
HRESULT CreateAutomationAdmin([in] BSTR bstrNewAdmin, // admin name[in] BSTR bstrPassword, //admin password[out,retval] IDispatch** pAdminAccount); //ICIAdmin Account
Example (VBScript):
Set admin = oServer.CreateAutomationAdmin("admin", "pass")
EFT v6.3.1 and later
Function CreateComplexPassword(bstrUserName As String) As String
Create a complex password.
HRESULT CreateComplexPassword( [in] BSTR bstrUserName, [out, retval] BSTR *bstrPassword);
Example (VBScript):
pass = oServer.CreateComplexPassword ("user")
EFT v6.3.1 and later
Function CreatePGPKey(bstrFullName As String, bstrEmailAddress As String, dtExpirationDate As Date, nKeyType As PGPKeyType, nKeyCipher As PGPKeyCipher, ulKeySize As DWord, bstrPassphrase As String) As String
Create a PGPKey on EFT.
HRESULT CreatePGPKey( [in] BSTR bstrFullName, [in] BSTR bstrEmailAddress, [in] DATE dtExpirationDate, [in] PGPKeyType nKeyType, [in] PGPKeyCipher nKeyCipher, [in] ULONG ulKeySize, [in] BSTR bstrPassphrase, [out,retval] BSTR* pVal);
PGPKeyType
-
PGPKeyType_DSS = 0
-
PGPKeyType_RSA = 1
-
PGPKeyType_RSALegacy = 2
PGPKeyCipher
-
PGPKeyCipher_IDEA = 0
-
PGPKeyCipher_3DES = 1
-
PGPKeyCipher_CAST5 = 2
-
PGPKeyCipher_AES128 = 3
-
PGPKeyCipher_AES192 = 4
-
PGPKeyCipher_AES256 = 5
-
PGPKeyCipher_TWOFISH = 6
Example (VBScript):
strKeyId = oServer.CreatePGPKey("Ivan Ivanuch", "ipetrov@mail.com", expDate, PGPKeyType_RSA, PGPKeyCipher_IDEA, 1024, "password") MsgBox "New key id is " & strKeyId
EFT v6.3 - 7.4.x
Sub CreateSSHKey
Create an SSH Key on EFT. (In v8.0.4, nKeyBits is replaced with nKeyParams.)
HRESULT CreateSSHKey( [in] LONG nKeyBits, [in] BSTR bstrPassword, [in] BSTR bstrPrivateKeyFile, [in] BSTR bstrPublicKeyFile, [in] VARIANT_BOOL vbComFormat, [in] LONG nSiteId, [in] BSTR bstrCopyTo);
Example (VBScript):
oServer.CreateSSHKey 1024, "passphrase", "C:\Private", "C:\Public.pub", False, 0, ""
EFT v6.3 and later
Create an SSK Key on EFT remotely.
HRESULT CreateSSHKeyRemotely( [in] LONG nKeyBits, (In v8.0.4, nKeyBits is replaced with nKeyParams.) [in] BSTR bstrPassword, [in] BSTR bstrPrivateKeyFile, [in] BSTR bstrPublicKeyFile, [in] LONG nSiteId, [in] BSTR bstrCopyTo);
-
SSH keys create in memory on the server side and save as files on COM side. So, these methods work in the same way.
-
To import a new created key and specify it as site's SFTP key, you should pass nSiteId > 0 and empty bstrCopyTo
-
To import public part of the new created key into site's SSH key manager, you should pass nSiteId > 0 and non-empty bstrCopyTo
EFT v7.411 and later
(bstrKeyFile As String, bstrReqfile As String, bstrcertfile As String, bstrPassword As String, bstrCountryName As String, bstrStateOrProvinceName As String, bstrLocalityName As String, bstrOrganizationName As String, bstrOrganizationalUnitName As String, bstrCommonName As String, bstrEmailAddress As String, nBits As Long, nDays As Long, CertFormat As CertificateFormat, PrivateKeyFormat As CertificateFormat, nSiteId As Long, vbUseCert As Boolean, vbMakeTrusted As Boolean)
Create an SSL certificate on EFT.
HRESULT CreateSSLCertificate( [in] BSTR bstrKeyfile, [in] BSTR bstrReqfile, [in] BSTR bstrcertfile, [in] BSTR bstrpassword, [in] BSTR bstrCountryName, [in] BSTR bstrStateOrProvinceName, [in] BSTR bstrLocalityName, [in] BSTR bstrOrganizationName, [in] BSTR bstrOrganizationalUnitName, [in] BSTR bstrCommonName, [in] BSTR bstrEmailAddress, [in] LONG nBits, [in] LONG nDays, [in] CertificateFormat CertFormat, [in] CertificateFormat PrivateKeyFormat, [in] LONG nSiteId, [in] VARIANT_BOOL vbUseCert, [in] VARIANT_BOOL vbMakeTrusted);
Example (VBScript):
''This script is an example of using the COM API to call the createSSLCertificate() function 'First check to see if the path C:\Certificates\ exists on the system (if not create one) 'This path is used in the files created below. (You can change this value to whatever location you want just update entire script.) Set fileSystemObject = CreateObject("Scripting.FileSystemObject") Dim exists If Not( exists ) Then WScript.Echo "Please create a 'Certificates' folder on your C:\ drive." End If ' Instantiate COM object Set SFTPServer = WScript.CreateObject("SFTPCOMInterface.CIServer") ' Set connection information 'txtServer = IP Address = x.x.x.x = example : "192.168.1.100" "[IP ADDRESS HERE]" "1100" "Administrator" "password" ' Connect to server If Not Connect(txtServer, txtPort, txtUserName, txtPassword) Then End If 'Initialize all needed variables Dim keyfile, reqfile, certfile, passphrase, country, province, city, organization, organizationUnit, commonname, email Dim keylength, days, certFormat, privKeyFormat, siteId, useCert, makeTrust 'Name and location of where you want the private key file (.key), request file (.csr), and certificate file (.crt) stored 'In this example, createSSLCertificate() will create these 3 files at the location C:\Certificates\ "C:\Certificates\Cert.key" "C:\Certificates\Cert.csr" "C:\Certificates\Cert.crt" 'Passphrase for certificate "passphrase" 'Location information for certificate "US" 'State/Province "TX" 'City/Town "San Antonio" 'Organization Name/Unit "GS" "QA" 'Common Name (typically name or domain name associated with the site) "www.globalscape.com" "globalscape@example.com" 'Key Length(in bits) 1024 21 'Certificate/PrivateKey Format PEM = (ASCII) privKeyFormat = PEM 0 'Use Certification/Make Trusted False False 'With all these parameters ready, create SSL Certificate 'Close of COM Object 'Dispose of COM Object Set SFTPServer = Nothing Function Connect (serverOrIpAddress, port, username, password) Error Resume Next SFTPServer.Connect serverOrIpAddress, port, username, password If Err.Number 0 Then CStr(err.Number) & "]", vbInformation, "Error" False Exit Function End If True End Function
EFT v6.3 and later
and
Function SignSSLCertificateRemotely As Long
Used to create and sign an SSL certificate
HRESULT CreateSSLCertificateRemotely( [in] BSTR bstrKeyfile, [in] BSTR bstrReqfile, [in] BSTR bstrcertfile, [in] BSTR bstrpassword, [in] BSTR bstrCountryName, [in] BSTR bstrStateOrProvinceName, [in] BSTR bstrLocalityName, [in] BSTR bstrOrganizationName, [in] BSTR bstrOrganizationalUnitName, [in] BSTR bstrCommonName, [in] BSTR bstrEmailAddress, [in] LONG nBits, [in] LONG nDays, [in] CertificateFormat CertFormat, [in] CertificateFormat PrivateKeyFormat, [in] LONG nSiteId, [in] VARIANT_BOOL vbUseCert, [in] VARIANT_BOOL vbMakeTrusted);
HRESULT SignSSLCertificateRemotely( [in] BSTR bstrRequest, [in] BSTR bstrServCert, [in] BSTR bstrPrivateKey, [in] BSTR bstrPass, [in] BSTR bstrOutCert, [in] LONG nDays);
EFT v7.3.6 and later
Property DefaultPollTimeout As Long
Retrieves or specifies the default value for the user database refresh interval (set to "never" by default).
HRESULT DefaultPollTimeout([out, retval] LONG* pVal); HRESULT DefaultPollTimeout([in] LONG newVal);
Example (VBScript):
Retrieving:
Interval = oServer.DefaultPollTimeout
Specifying:
oServer.DefaultPollTimeout = -1
EFT v6.3 and later
Sub DeleteContentIntegrityControlProfile(pProfileName As String)
HRESULT DeleteContentIntegrityControlProfile( [in] BSTR pProfileName);
Removes the specified Content Integrity Control profile.
(See also the ICIContentIntegrityControlActionParams ProfileName property.)
EFT v7.0.3 and later
Property DisconnectDueToTimeout As Boolean
(On a PCI DSS-enabled account, disabling the timeout is not allowed.)
Enables/disables the timeout to disconnect the administration interface from EFT after administrator inactivity.
HRESULT DisconnectDueToTimeout([out, retval] VARIANT_BOOL* pVal); HRESULT DisconnectDueToTimeout(VARIANT_BOOL newVal);
Example (VBScript):
Retrieving:
If Server.DisconnectDueToTimeout = VARIANT_TRUE Then ‘Admin timeout enabled End If
Specifying:
‘disable admin timeout Server.DisconnectDueToTimeout = VARIANT_FALSE
EFT v6.5 and later
Property DisconnectDueToTimeoutPeriod As Long
(On a PCI DSS-enabled account, setting a timeout longer than 15 minutes is not allowed.)
Set the timeout (in minutes) after administrator inactivity to disconnect the administration interface from EFT (and log out the administrator account).
Remark: Only values from 1 to 9999 are accepted
HRESULT DisconnectDueToTimeoutPeriod([out,retval] LONG* pVal); HRESULT DisconnectDueToTimeoutPeriod([in] LONG newVal);
Example (VBScript):
Retrieving:
If Server.DisconnectDueToTimeoutPeriod = 15 Then ‘There is 15 minutes admin timeout period End If
Specifying:
‘set admin timeout period to 5 minutes Server.DisconnectDueToTimeoutPeriod = 5
EFT v6.5 and later
Drain server allows in-progress transfers to continue, and prevents new ones from starting to gracefully drain connections and event rule activity.
HRESULT DrainServer([in] VARIANT_BOOL bRestartServer);
EFT v7.4 and later
For an example using this property, refer to the BackupEx script in Script Examples.
Enable or disable Auditing and Reporting, or evaluate status of Auditing and Reporting.
HRESULT EnableARM([out, retval] VARIANT_BOOL *pVal); HRESULT EnableARM([in] VARIANT_BOOL newVal);
Example (VBScript):
Dim bARMStatus: bARMStatus = oServer.EnableARMo
To set the state:
oServer.EnableARM = false
All versions
HRESULT EndHAUpgrade();
(See also BeginHAUpgrade and GetHAUpgradeNodeState)
EFT v8.1 and later
Property EventRuleChangeLog As ERChangeLog
Retrieves or specifies whether adding comments to the Event Rule Change log is Off, Mandatory, or Optional.
HRESULT EventRuleChangeLog([out, retval] ERChangeLog *pVal); HRESULT EventRuleChangeLog([in] ERChangeLog newVal);
EFT v7.2 and later
Sub ExportPGPKey(bstrKeyId As String, vbIncludePrivate As Boolean, bstrFileName As String)
Export an Open PGP Key.
HRESULT ExportPGPKey( [in] BSTR bstrKeyId, [in] VARIANT_BOOL vbIncludePrivate, [in] BSTR bstrFileName);
Example (VBScript):
oServer.ExportPGPKey "0x12345678", False, "C:\PGP\pgpkey.asc"
EFT v6.3 - 7.4.x
Sub ExportSSHKey (1KeyID As Long, bzKeyFilePath As String) (Deprecated in v8)
Export an SSH key.
HRESULT ExportSSHKey([in] LONG lKeyID,[in] BSTR bzKeyFilePath);
Example (VBScript):
oServer.ExportSSHKey nKeyId, "C:\SSHKeys\key.pub"
Example (C#):
m_server.ExportSSHKey(key.ID, keyPath);
For an example using this method, refer to the SSH script in Script Examples.
EFT v6.3 - 7.4.x
HRESULT ForceAdminResetPasswordOnInitialLogin([out, retval] VARIANT_BOOL *pVal); HRESULT ForceAdminResetPasswordOnInitialLogin([in] VARIANT_BOOL newVal);
EFT v7.4.6 and later
Sub GenerateReport(pdispReportParams As Object, bzReportPath As String)
Generate an EFT report.
HRESULT GenerateReport( [in] IDispatch* pdispReportParams, [in] BSTR bzReportPath);
Example (VBScript):
Set ReportParams = CreateOb-ject("SFTPCOMInterface.CIReportActionParams") 'Setup report name, filters, period ' ... ReportParams.ReportFileFormat = PDFFormat Server.GenerateReport(ReportParams, "C:\Report\Report.pdf")
See also ICIReportActionParams Interface
EFT v6.1 and later
Function GetAdminIPs() As Variant
Retrieve an array of IP addresses for the computer on which EFT is running. The IP addresses can be used as LISTENING IP addresses for administration or protocol services.
HRESULT GetAdminIPs([out,retval] VARIANT* pVar);
Example (VBScript):
Dim arIPS : arIPS = oServer.GetAdminIPs() for i = LBound(arIPS) to UBound(arIPS) WScript.Echo CStr(i) & " - " & arIPS(i) next
EFT v4.3.4 and later
Function GetBackupArchiveInfo(bstrFilePath As String, nLoginType As AdminLoginType, bstrLogin As String, bstrPassword As String) As CIBackupArchiveInfo
Retrieves or specifies the backup archive information.
HRESULT GetBackupArchiveInfo( [in] BSTR bstrFilePath, [in] AdminLoginType nLoginType, [in] BSTR bstrLogin, [in] BSTR bstrPassword, [out,retval] IDispatch** pVal);
Example (VBScript):
Set oBackupSettings = oServer.GetBackupArchiveInfo("C:\backup.bak", EFTLogin, "admin", "swordfish")
EFT v6.3 and later
Function GetComplexPasswordSettings() As CIComplexPasswordSettings
Retrieve complex password settings.
HRESULT GetComplexPasswordSettings([out, retval] IDispatch** ppIComplexPasswordSettings);
Example (VBScript):
Set oPwdSettings = oServer.GetComplexPasswordSettings()
EFT v6.3 and later
Function GetContentIntegrityControlProfile(profileName As String) As Long
Retrieves the name of the Content Integrity Control profile.
HRESULT GetContentIntegrityControlProfile([in] BSTR profileName, [out, retval] long *profileIndex);
EFT v7.0.3 and later
Function GetHighAvailabilityParams() As Object and Sub SetHighAvailabilityParams(pdispParams As Object)
Retrieve/specify HA parameters.
HRESULT GetHighAvailabilityParams([out, retval] IDispatch** ppDispParams); HRESULT SetHighAvailabilityParams([in] IDispatch* pDispParams);
EFT v7.0 and later
Retrieve/specify HA upgrade node state
HRESULT GetHAUpgradeNodeState([out, retval] HAUpgradeNodeState *pVal);
(See also BeginHAUpgrade and EndHAUpgrade)
EFT v8.1 and later
Function GetIPAccessRules() As Variant
Retrieve an array of remote administration IP address access rules.
HRESULT GetIPAccessRules([ out, retval] VARIANT *aMasks);
See also AddIPAccessRule, RemoveIPAccessRule, MoveIPAccessRule methods, and the following interfaces:
ICIAutobanIPAccessRule Interface
ICIManualIPAccessRule Interface
ICIClientSettings : GetIPAccessRules
ICISite : GetIPAccessRules
Example (VBScript):
rules = oServer.GetIPAccessRules() For Each key In rules If key.type = 0 Then WScript.echo "AutoBan" End if If key.type = 1 Then WScript.echo "Manual " + key.address End if Next
EFT v6.3 and later
Function GetLocalIP(nIP As Long) As String
Given an index, retrieves a Local IP address.
HRESULT GetLocalIP([in] long nIP, [out, retval] BSTR *prop);
All versions
Function GetLocalTime() As String
Retrieve EFT's local time.
HRESULT GetLocalTime( [out, retval] BSTR *pTime);
All versions
Sub GetPGPKeyringSettings(pPublicPath As String, pPrivatePath As String)
For an example using this method, refer to the PGP script in Script Examples.
Retrieve the OpenPGP Keyring settings.
HRESULT GetPGPKeyringSettings( [out] VARIANT* pPublicPath, [out] VARIANT* pPrivatePath);
Example (VBScript):
oServer.GetPGPKeyringSettings strPublicKeyring, strPrivateKeyring
EFT v6.3 - 7.4.x
Function GetServerAdminCount() As Long
Retrieve a count of administrator accounts defined on EFT.
HRESULT GetServerAdminCount([out,retval] long* lCount);
Example (VBScript):
Dim i : i = oServer.GetServerAdminCount()
All versions
Function GetSiteChangeLog(nSite As Int, [iDBrecsLimit As Int = 500000]) As Variant
Retrieve the change log on a Site.
HRESULT GetSiteChangeLog( [in] int nSite, [in, defaultvalue(500000)] int iDBrecsLimit, [out, retval] VARIANT* pVal);
EFT v7.2 and later
Function GetHAUpgradeNodeState() As HAUpgradeNodeState
HRESULT GetHAUpgradeNodeState([out, retval] HAUpgradeNodeState *pVal);
EFT v8.1 and later
Specify the HA coherence queue. (read only)
HRESULT HACoherenceQueue([out, retval] BSTR *pVal);
EFT v7.0 and later
Allows you to specify one or more nodes as the backup to execute Event Rules. This list can be overridden in the Event Rules.
HRESULT HAConfigurationBackupNodeList([out, retval] VARIANT *pVal); HRESULT HAConfigurationBackupNodeList([in] VARIANT pVal);
EFT v7.2 and later
Property HAConfigurationDefaultNodeList As Variant
Allows you to specify one or more nodes as the default to execute Event Rules. This list can be overridden in the Event Rules.
HRESULT HAConfigurationDefaultNodeList([out, retval] VARIANT *pVal); HRESULT HAConfigurationDefaultNodeList([in] VARIANT pVal);
EFT v7.0.2 and later
Retrieves the path to the HA configuration file. (read only)
HRESULT HAConfigurationFilePath([out, retval] BSTR* pVal);
EFT v7.0 and later
Retrieves whether HA is enabled. (read only)
HRESULT HAEnabled([out, retval] VARIANT_BOOL *pVal);
EFT v7.0 and later
Retrieves the event queue. (read only)
HRESULT HAEventQueue([out, retval] BSTR *pVal);
EFT v7.0 and later
Property HAFailureNotificationEmail As String
EFT v7.0 and later
Retrieves multicast address. (read only)
HRESULT HAMulticastAddress([out, retval] BSTR *pVal);
EFT v7.0 and later
Retrieves multicast port. (read only)
HRESULT HAMulticastPort([out, retval] long *pVal);
EFT v7.0 and later
Sub ImportPGPKey(bstrKey As String, bstrKeyFile As String)
Imports specified PGP key.
HRESULT ImportPGPKey( [in] BSTR bstrKeyPath, [out, retval] BSTR* pNewKeyID);
Example (VBScript):
KeyId = oServer.ImportPGPKey("C:\PGP\pgpkey.asc")
EFT v6.3 - 7.4.x
Function ImportSSHKey(bstrKeyPath As String) As Long (Deprecated in v8)
Import an SSH public key. Unlike other SSL certificate-related methods dealing with files, the key to import must be located on the computer running COM, not on the computer running EFT. This difference reflects EFT administration interface behavior.
HRESULT ImportSSHKey( [in] BSTR bstrKeyPath, // Public key path (on the computer running COM) [out, retval] long *plID); // ID of the key imported (can be used to assign the key to client)
Example (VBScript):
Client.SetSftpAuthenticationType "key" keyID = Server.ImportSSHKey("C:\client.pub") Client.SetSSHKeyID keyID
Example (C#):
m_server.ImportSSHKey(@"C:\SSHKey.pub"); object publicPath = new object(); object privatePath = new object(); m_server.GetPGPKeyringSettings(out publicPath, out privatePath); m_server.SetPGPKeyringSettings(@"C:\filecryptdata\pubring.pgp", @"C:\filecryptdata\secring.pgp");
Example (C#):
int keyId = m_server.ImportSSHKey(keyPath);
For an example using this method, refer to the PGP script or SSH script in Script Examples.
EFT v6.1 - 7.4.x
Property InactiveAccountsRemoving As Boolean
Enable or disable remove inactive administrator accounts feature.
HRESULT InactiveAccountsRemoving([out, retval] VARIANT_BOOL *pVal); HRESULT InactiveAccountsRemoving([in] VARIANT_BOOL newVal);
Example (VBScript):
Retrieving:
If MyServer.InactiveAccountsRemoving Then Inactive accounts will be removed … End If
Specifying:
MyServer.InactiveAccountsRemoving = False Inactive admin account won’t be removed.
EFT v7.0 and later
Property InvalidAttemptsPeriod As Long
Retrieves or specifies the time period during which will be calculating invalid login attempts. Measured in minutes. Limitation: 1 = InvalidAttemptsPeriod = 99
HRESULT InvalidAttemptsPeriod([out, retval] LONG *pVal); HRESULT InvalidAttemptsPeriod([in] LONG newVal);
Example (VBScript):
Retrieving:
MsgBox "Invalid attempts period: " & CStr(MyServer.InvalidAttemptsPeriod)
Specifying:
MyServer.InvalidAttemptsPeriod = 18
EFT v7.0 and later
Property IPAccessAllowedDefault As Boolean
Retrieves or specifies the default IP Access restriction list for remote administration.
HRESULT IPAccessAllowedDefault([out, retval] VARIANT_BOOL *pVal); HRESULT IPAccessAllowedDefault([in] VARIANT_BOOL newVal);
True = All IP addresses are allowed except those specified
False = All IP addresses are denied except those specified
All versions
Function IsServerServiceStarted(bstrHost As String) As Boolean
Determine if the EFT Server service is started.
HRESULT IsServerServiceStarted( [in] BSTR bstrHost, [out,retval] VARIANT_BOOL* pvResult);
Example (VBScript):
If Not oServer.IsServerServiceStarted("192.168.1.1") Then oServer.StartServerService("192.168.1.1") End If
EFT v6.3 and later
Property IsStarted As Boolean read-only
Determine if the EFT Server service is started.
HRESULT IsStarted( [out, retval] VARIANT_BOOL* pVal);
Example (VBScript):
If Not oServer.IsStarted Then oServer.Start() End If
EFT v6.3 and later
Property KeyFilePath As String
Retrieves or specifies the file path for EFT's private key files.
HRESULT KeyFilePath([out, retval] BSTR *pVal); HRESULT KeyFilePath([in] BSTR newVal);
All versions
Property LastModifiedBy As String read-only
Retrieve the name of the user who last modified EFT.
HRESULT LastModifiedBy([out, retval] BSTR* pVal);
Example (VBScript):
MsgBox "Last modified by " & oServer.LastModifiedBy
Example (C#):
string lastModifiedBy = m_server.LastModifiedBy; string lastModifiedTime = m_server.LastModifiedTime.ToString("MM/dd/yyyy HH:mm:ss"); Console.WriteLine(string.Format("EFT properties Last Modified: {0} by {1}", lastModifiedTime, lastModifiedBy));
See also LastModifiedTime, below.
For an example using this property, refer to the ServerStats script in Script Examples.
EFT v6.3 and later
Property LastModifiedTime As Date read-only
See also LastModifiedBy, above.
For an example using this property, refer to the ServerStats script in Script Examples.
Retrieve the date and time when EFT was last modified.
HRESULT LastModifiedTime([out, retval] DATE* pVal);
Example (VBScript):
MsgBox "Modification time is " & CStr(oServer.LastModifiedTime)
Example (C#):
string lastModifiedBy = m_server.LastModifiedBy; string lastModifiedTime = m_server.LastModifiedTime.ToString("MM/dd/yyyy HH:mm:ss"); Console.WriteLine(string.Format("EFT properties Last Modified: {0} by {1}", lastModifiedTime, lastModifiedBy));
EFT v6.3 and later
Property LimitLoginAttempts As Boolean
Enable or disable lockout administrator accounts after incorrect login attempts feature.
HRESULT LimitLoginAttempts([out, retval] VARIANT_BOOL *pVal); HRESULT LimitLoginAttempts([in] VARIANT_BOOL newVal);
Example (VBScript):
Retrieving:
If MyServer.LimitLoginAttempts Then ‘feature is enabled End If
Specifying:
MyServer.LimitLoginAttempts = False ‘feature is disabled
EFT v7.0 and later
Property ListenIP As Long
In version 6.4 and later, use ListenIPs, below, instead.
Retrieves or specifies EFT's IP address.
HRESULT ListenIP([out, retval] long *pVal); HRESULT ListenIP([in] long newVal);
All versions
Replaces ListenIP, above.
Retrieves or specifies the IP addresses on which EFT listens.
HRESULT ListenIPs([out, retval] VARIANT* pVal); HRESULT ListenIPs([in] VARIANT newVal);
EFT v6.4 and later
Property LockoutPeriod As Long
Retrieves or specifies the lockout period for administrator accounts after incorrect login attempts. Measured in minutes. Limitation: 30, 60, or 90
HRESULT LockoutPeriod([out, retval] LONG *pVal); HRESULT LockoutPeriod([in] LONG newVal);
Example (VBScript):
Retrieving:
MsgBox "Lockout Period: " & CStr(MyServer.LockoutPeriod)
Specifying:
MyServer.LockoutPeriod = 60
EFT v7.0 and later
Property LogPath As String
Retrieves or specifies the file path to EFT's log. You must restart the EFT Server service to complete any changes to the log path.
HRESULT LogPath([out, retval] BSTR *pVal); HRESULT LogPath([in] BSTR newVal);
Example (VBScript):
Retrieving:
logPath = oServer.LogPath
Specifying:
oServer.LogPath = "C:\Logs\server.log"
All versions
Property LogRotation As Int
Retrieves or specifies the amount of time before a new log is started. You can choose from no rotation or three different lengths of time. You must restart the EFT Server service to complete any change to the log rotation period.
HRESULT LogRotation([out, retval] int *pVal); HRESULT LogRotation([in] int newVal);
Values
0 = Never
1 = Daily
2 = Weekly
3 = Monthly
All versions
Property LogMode As Int
Retrieves or specifies EFT's log format. You can choose no log, or you can choose to generate a log in one of three formats. You must restart the EFT Server service for any changes to the log format to take effect.
HRESULT LogMode([out, retval] LogMode* pVal); HRESULT LogMode([in] LogMode newVal);
Values
2 - W3C Extended Log File Format
3 - Microsoft IIS Log File Format
4 - NCSA Common Log File Format
5 - No Log
All versions
Property MaxInactiveAccountPeriod As Long
Retrieves or specifies the period of time after which inactive administrator account will be removed. Measured in days. Limitation: 1 = invalidattemptsperiod =365
HRESULT MaxInactiveAccountPeriod([out, retval] LONG *pVal); HRESULT MaxInactiveAccountPeriod([in] LONG newVal);
Example (VBScript):
Retrieving:
MsgBox "Inactive account period" & CStr(MyServer.MaxInactiveAccountPeriod)
Specifying:
MyServer.MaxInactiveAccountPeriod = 14 ‘two weeks
EFT v7.0 and later
Property MaxInvalidLoginAttempts As Long
Retrieves or specifies the max login attempts for administrator accounts before it will be locked. Limitation: 1 = MaxInvalidLoginAttempts = 99
HRESULT MaxInvalidLoginAttempts([out, retval] LONG *pVal); HRESULT MaxInvalidLoginAttempts([in] LONG newVal);
Example (VBScript):
Retrieving:
MsgBox "Max attempts: " & CStr(MyServer.MaxInvalidLoginAttempts)
Specifying:
MyServer.MaxInvalidLoginAttempts = 10
EFT v7.0 and later
Function ModuleRegistrationState(m As ServerModule) As RegistrationState
Retrieves the registration status of EFT modules.
HRESULT ModuleRegistrationState( [in] ServerModule m, [out, retval] RegistrationState* pRS);
Example (VBScript):
The example code illustrates how to correctly use the function and related objects. Using ServerModule with the ModuleRegistrationState function provides the RegistrationState enum value.
If Server.ModuleRegistrationState(0) 0 Then MsgBox "EFT is not registered" End If
or
If Server.ModuleRegistrationState(0)= 0 Then MsgBox "EFT is registered" End If
EFT v6.1 and later
Sub MoveIPAccessRule(nRulePosFrom As Long, nRulePosTo As Long)
See also GetIPAccessRules, RemoveIPAccessRule, and AddIPAccessRule
See also the following interfaces:
ICIAutobanIPAccessRule Interface
ICIManualIPAccessRule Interface
Changes allowed remote administration IP access rule position.
HRESULT MoveIPAccessRule( [in] long nRulePosFrom, //initial position {in] long nRulePosTo); //new position
Example (VBScript):
oServer.MoveIPAccessRule(1,2)
EFT v6.3 and later
Property PassPhrase As String
Retrieves or specifies an SSL certificate private key passphrase.
HRESULT PassPhrase([out, retval] BSTR *pVal); HRESULT PassPhrase([in] BSTR newVal);
All versions
Updates the COM object with the latest set of data from EFT. For example, when you use Site.ForceSynchronizeUserDatabase, you must use the RefreshSettings method after waiting a suitable amount of time for the database synchronization to complete.
If a call to any COM method throws an "MX Error: 52 (0x00000034)", this means that the COM object needs to invoke RefreshSettings.
HRESULT RefreshSettings();
All versions
Sub RemoveIPAccessRule (nRulePos As Long)
See also GetIPAccessRules, AddIPAccessRule, and MoveIPAccessRule, and the following interfaces:
ICIAutobanIPAccessRule Interface
ICIManualIPAccessRule Interface
Removes an allowed or denied IP mask for remote administration.
HRESULT RemoveIPAccessRule([in] long nRulePos); //position
Example (VBScript):
oServer.RemoveIPAccessRule(0)
EFT v6.3 and later
Sub RemovePGPKey(bstrKeyId As String)
Removes OpenPGP Key from EFT.
HRESULT RemovePGPKey([in] BSTR bstrKeyId);
Example (VBScript):
oServer.RemovePGPKey "0x01234567"
EFT v6.3 - 7.4.x
Sub RemoveServerAdminAccount(bstrAdminUser As String, [accountType As AdminAccountType = 0])
Removes an administrator account from EFT.
HRESULT RemoveServerAdminAccount([in] BSTR bstrAdminUser,[in, defaultvalue(EFTAccount)] AdminAccountType accountType);
Example (VBScript):
Version 6.1:
oServer.RemoveServerAdminAccount("subadmin");
Version 6.2 and later:
An optional parameter was added to ICIServer::RemoveServerAdminAccount method to allow specifying the type of administrator account to remove (EFT-managed by default)
Server.RemoveServerAdminAccount "Admin1", ADAccount
EFT 4.3.4 and later
Sub RemoveSSHKey(lID As Long) (Deprecated in v8)
For an example using this method, refer to the SSH script in Script Examples.
Removes an SSH public key from EFT.
HRESULT RemoveSSHKey([in] long lID); // key ID
Example (VBScript):
For Each key In Server.AvailableSSHKeys 'remove all keys Server.RemoveSSHKey key.ID Next
Example (C#):
m_server.RemoveSSHKey(key.ID);
EFT v6.1 - 7.4.x (deprecated v8)
Sub RenameSSHKey(lID As Long, bstrNewName As String) (Deprecated in v8)
Renames an SSH Key.
HRESULT RenameSSHKey([in] LONG lID,[in] BSTR bstrNewName);
Example (VBScript):
For Each key In oServer.AvailableSSHKeys If key.Name = "Masha" Then oServer.RenameSSHKey key.ID, "Maria"> End If Next
Example (C#):
m_server.RenameSSHKey(keyId, string.Format("{0}_new", key.Name));
EFT v6.3 - 7.4.x
Property RequireStrongPasswords As Boolean
Retrieves or specifies whether strong, complex passwords are required.
HRESULT RequireStrongPasswords([out, retval] VARIANT_BOOL *pVal); HRESULT RequireStrongPasswords([in] VARIANT_BOOL newVal);
Example (VBScript)
Retrieving:
MsgBox "Complex passwords for admins: " & CStr(oServer.RequireStrongPasswords)
Specifying:
oServer.RequireStrongPasswords = False
EFT v6.3 and later
Sub RestoreServerConfiguration(bstrFilePath As String, nLoginType As AdminLoginType, bstrLogin As String, bstrPassword As String)
Restores a backed up EFT configuration.
HRESULT RestoreServerConfiguration( [in] BSTR bstrFilePath, [in] AdminLoginType nLoginType, [in] BSTR bstrLogin, [in] BSTR bstrPassword);
Retrieve backup information with GetBackupArchiveInfo.
Example (VBScript):
oServer.RestoreServerConfiguration "C:\lastbackup.bak", EFTLogin, "admin", "password"
EFT v6.3 and later
Sub RestoreServerConfigurationEx(pVal As CIBackupArchiveInfo)
Restores EFT configuration.
HRESULT RestoreServerConfigurationEx([in] IDispatch* pVal);
Retrieve backup information with GetBackupArchiveInfo.
Example (VBScript):
oServer.RestoreServerConfigurationEx oBackupSettings
For an example using this method, refer to the Backup script in Script Examples.
EFT v6.3 and later
Function SendTestEmail(bstrRecipientAddress As String) As Boolean
Used to send an email to test SMTP server configuration.
HRESULT SendTestEmail( [in] BSTR bstrRecipientAddress, [out, retval] VARIANT_BOOL* pVal);
EFT v7.3.6 and later
This property is an object of type ICIServerInfo for the connected server.
HRESULT ServerInfo [out, retval] IDispatch** ppVal);
EFT v7.2.1 and later
Sub SetComplexPasswordSettings(pIComplexPasswordSettings As CIComplexPasswordSettings)
Changes complex password settings.
HRESULT SetComplexPasswordSettings([in]IDispatch** pIComplexPasswordSettings);
Retrieves complex password settings with GetComplexPasswordSettings.
Example (VBScript):
Set oPwdSettings = oServer.GetComplexPasswordSettings() oPwdSettings.MinPasswordLength = 8 oServer.SetComplexPasswordSettings(oPwdSettings)
EFT v6.3 and later
Sub SetPGPKeyringSettings(newPublicKeyring As String, newPrivateKeyring As String)
For an example using this method, refer to the PGP script in Script Examples.
Changes OpenPGP Keyring settings.
HRESULT SetPGPKeyringSettings( {in] BSTR newPublicKeyring, [in] BSTR newPrivateKeyring);
Retrieve OpenPGP Keyring settings with GetPGPKeyringSettings.
Example (VBScript):
oServer.SetPGPKeyringSettings "C:\PGP\pubrign.pgp", "C:\PGP\secring.pgp"
EFT v6.3 - 7.4.x
Sub SetSSLCertificate(bzCertFilePath As String, bzKeyFilePath As String, bzPassPhrase As String)
Specifies the SSL certificate for serving secure administration connections
HRESULT SetSSLCertificate( [in] BSTR bzCertFilePath, // Certificate path [in] BSTR bzKeyFilePath, // Certificate private key path [in] BSTR bzPassPhrase); // Certificate private key password
Example (VBScript):
Server.SetSSLCertificate "C:\admin.crt", "C:\admin.key", "admin_passwd"
EFT v6.1 and later
HRESULT SFTPEncodingAlgorithms([out, retval] BSTR *pVal); HRESULT SFTPEncodingAlgorithms([in] BSTR newVal);
EFT v8.0.5 and later
Property SFTPIdentificationComment As String
HRESULT SFTPIdentificationComment([out, retval] BSTR *pVal); HRESULT SFTPIdentificationComment([in] BSTR newVal);
EFT v8.0.5 and later
Property SFTPKexAlgorithms As String
HRESULT SFTPKexAlgorithms([out, retval] BSTR *pVal); HRESULT SFTPKexAlgorithms([in] BSTR newVal);
EFT v8.0.5 and later
Property SFTPMacAlgorithms As String
HRESULT SFTPMacAlgorithms([out, retval] BSTR *pVal); HRESULT SFTPMacAlgorithms([in] BSTR newVal);
EFT v8.0.5 and later
Property SFTPSoftwareVersion As String
HRESULT SFTPSoftwareVersion([out, retval] BSTR *pVal); HRESULT SFTPSoftwareVersion([in] BSTR newVal);
EFT v8.0.5 and later
Sub SignSSLCertificate(bstrRequest As String, bstrServCert As String, bstrPrivateKey As String, bstrPass As String, bstrOutCert As String, nDays As Long)
Signs an SSL certificate (Only for PEM format)
HRESULT SignSSLCertificate( [in] BSTR bstrRequest, [in] BSTR bstrServCert, [in] BSTR bstrPrivateKey, [in] BSTR bstrPass, [in] BSTR bstrOutCert, [in] LONG nDays);
EFT v6.3 and later
HRESULT SignSSLCertificateRemotely( [in] BSTR bstrRequest, [in] BSTR bstrServCert, [in] BSTR bstrPrivateKey, [in] BSTR bstrPass, [in] BSTR bstrOutCert, [in] LONG nDays);
EFT v7.3.6 and later
Function Sites() As CISites
Retrieves a list of Sites and open the ICISites interface. You can subsequently use the ICISites Item method to retrieve a pointer to a particular Site. This method returns a pointer to an ICISites interface.
HRESULT Sites([out, retval] ICISites** prop);
Example (VBScript):
Dim Server As CIServer 'assumes the SFTPCOMInterface Type Library is referenced by the VB IDE Dim Site As CISite 'instantiates the ISite interface Dim Sites As CISites 'instantiates the ISites interface 'insert connection routines here 'now retrieve the list of sites and then set a pointer to the first one Set Sites = Server.Sites 'now retrieve the list of sites in the server Set Site = Sites.Item(0) 'continue rest of code...
Example (C#):
CISites sites = m_server.Sites();
For an example using this method, refer to the ServerIPBanEntry or RemoveSite script in Script Examples.
All versions
Property SMTPAddressBook As String
Retrieves or specifies a list of email addresses in the SMTP address book.
HRESULT SMTPAddressBook([out, retval] BSTR* pVal); HRESULT SMTPAddressBook([in] BSTR newVal);
Example (VBScript):
strEmailList = oServer.SMTPAddressBook If strEmailList "" Then strEmailList = strEmailList + "; " End If strEmailList = strEmailList + “NewRecipientName(SomeAddr(at)SomeServer.com)“ oServer.SMTPAddressBook = strEmailList
EFT v6.3 and later
Property SMTPAuthentication As SMTPAuthType
Retrieves or specifies SMTP authentication and type.
HRESULT SMTPAuthentication([out, retval] SMTPAuthType* pVal);
HRESULT SMTPAuthentication([in] SMTPAuthType newVal);
EFT v8.2 and later
Property SMTPXOAuth2GoogleUsername As String
Retrieves or specifies SMTP XOAuth Google username.
HRESULT SMTPXOAuth2GoogleUsername([out, retval] BSTR* pVal);
HRESULT SMTPXOAuth2GoogleUsername([in] BSTR newVal);
EFT v8.2 and later
SMTPXOAuth2GoogleKeyFile
Retrieves or specifies SMTP XOAuth Google key file.
HRESULT SMTPXOAuth2GoogleKeyFile([out, retval] BSTR* pVal);
HRESULT SMTPXOAuth2GoogleKeyFile([in] BSTR newVal);
EFT v8.2 and later
Property SMTPLogin As String
Retrieves or specifies the username for the email server used by EFT for event notifications, if authentication is required.
HRESULT SMTPLogin([out, retval] BSTR *pVal); HRESULT SMTPLogin([in] BSTR newVal);
All versions
Property SMTPPassword As String
Retrieves or specifies the password for the email server used by EFT for event notifications, if authentication is required.
HRESULT SMTPPassword([out, retval] BSTR *pVal); HRESULT SMTPPassword([in] BSTR newVal);
All versions
Property SMTPPort As Long
Retrieves or specifies the port number for connection to the SMTP server used by EFT for event notifications.
HRESULT SMTPPort([out, retval] long *pVal); HRESULT SMTPPort([in] long newVal);
All versions
Property SMTPRecipientAddr As String
Retrieves or specifies the email address of the recipient notifications sent by EFT.
HRESULT SMTPRecipientAddr([out, retval] BSTR *pVal); HRESULT SMTPRecipientAddr([in] BSTR newVal);
All versions
Property SMTPRecipientName As String
Retrieves or specifies the administrator email name for email notifications sent by EFT.
HRESULT SMTPRecipientName([out, retval] BSTR *pVal); HRESULT SMTPRecipientName([in] BSTR newVal);
All versions
Property SMTPSenderAddr As String
Retrieves or specifies the administrator email address for email notifications sent by EFT.
HRESULT SMTPSenderAddr([out, retval] BSTR *pVal); HRESULT SMTPSenderAddr([in] BSTR newVal);
All versions
Property SMTPSenderName As String
Retrieves or specifies the From name used in email notifications sent by EFT.
HRESULT SMTPSenderName([out, retval] BSTR *pVal); HRESULT SMTPSenderName([in] BSTR newVal);
All versions
Property SMTPServer As String
Retrieves or specifies the address for the email server used by EFT for sending event notifications.
HRESULT SMTPServer([out, retval] BSTR *pVal); HRESULT SMTPServer([in] BSTR newVal);
All versions
Property SMTPUseAuthentication As Boolean
Retrieves or specifies whether the SMTP server requires authentication.
HRESULT SMTPUseAuthentication([out, retval] VARIANT_BOOL* pVal); HRESULT SMTPUseAuthentication([in] VARIANT_BOOL newVal);
Examples (VBScript):
Retrieving:
If oServer.SMTPUseAuthentication Then ' some code End If
Specifying:
oServer.SMTPUseAuthentication = False
EFT v6.3 and later
Retrieves or specifies whether Implicit TLS is specified for the SMTP server.
HRESULT SMTPUseImplicitTLS([out, retval] VARIANT_BOOL* pVal);HRESULT SMTPUseImplicitTLS([in] VARIANT_BOOL newVal);
EFT 7.3.6 and later
Property SSHFIPSEnabled As Boolean
Retrieves or specifies whether FIPS SSH is enabled. Requires EFT restart.
HRESULT SSHFIPSEnabled([out, retval] VARIANT_BOOL* pVal); HRESULT SSHFIPSEnabled([in] VARIANT_BOOL newVal);
EFT v6.3 and later
Specifies whether to send an email upon SSL certification expiration.
HRESULT SSLCertSendEmailExpiration ([out, retval] VARIANT_BOOL* pVal); HRESULT SSLCertSendEmailUponExpiration([in] VARIANT_BOOL newVal);
Example (VBScript):
var server = server.SSLCertSendEmailUponExpiration = true;
EFT v8.1 and later
Specifies whether to send an email prior to the SSL certificate expiring.
HRESULT SSLCertSendEmailPriorExpiration([out, retval] VARIANT_BOOL* pVal); HRESULT SSLCertSendEmailPriorExpiration([in] VARIANT_BOOL newVal);
Example of use (C#):
var server = server.SSLCertSendEmailPriorExpiration = true;
EFT v8.1 and later
Retrieves or specifies number of days until expiration.
HRESULT SSLCertDaysPriorExpiration([out, retval] LONG* pVal); HRESULT SSLCertDaysPriorExpiration([in] LONG newVal);
Example of use (C#):
var server = server.SSLCertDaysPriorExpiration = 42;
EFT v8.1 and later
Retrieves or specifies SSL certification notification email recipients.
HRESULT SSLCertEmailRecipients([out, retval] BSTR* pVal); HRESULT SSLCertEmailRecipients([in] BSTR newVal);
Example of use (C#):
var server = server.SSLCertEmailRecipients = "h@t.com; y@y.com";
EFT v8.1 and later
Specifies whether to send a copy of the email notification an associated user.
HRESULT SSLCertSendEmailCopyToAssociatedUser([out, retval] VARIANT_BOOL* pVal); HRESULT SSLCertSendEmailCopyToAssociatedUser([in] VARIANT_BOOL newVal);
Example of use (C#):
var server = server.SSLCertSendEmailCopyToAssociatedUser = true;
EFT v8.1 and later
Property SSLFIPSEnabled As Boolean
Retrieves or specifies whether FIPS SSL is enabled. Requires EFT restart.
HRESULT SSLFIPSEnabled([out, retval] VARIANT_BOOL* pVal); HRESULT SSLFIPSEnabled([in] VARIANT_BOOL newVal);
Example (VBScript):
Retrieving:
If oServer.SSLFIPSEnabled Then MsgBox "SSL FIPS enabled" End If
Specifying:
oServer.SSLFIPSEnabled = False
EFT v6.3 and later
Retrieves or specifies the SSL version mask.
HRESULT SSLVersionMask([out, retval] int *pVal); HRESULT SSLVersionMask([in] int newVal);
Example (VBScript):
Dim iVersionMask: iVersionMask = oServer.SSLVersionMask WScript.Echo "Version Mask: " & iVersionMask
EFT v5.0.1 and later
Sub Start()
Starts the server.
HRESULT Start(void);
Example (VBScript):
oServer.Start()
EFT v6.3 and later
Function StartServerService(bstrHost As String) As Boolean
Starts EFT Server service.
HRESULT StartServerService( [in] BSTR bstrHost, //empty string means localhost [out,retval] VARIANT_BOOL* pvResult); // True=OK; False=error
Example (VBScript):
If oServer.StartServerService("192.168.0.1") Then MsgBox "EFT Service has started. " End If
Example (C#):
m_server.StartServerService("localhost")
EFT v6.3 and later
Property StartTime As Date
Retrieves the date and time when EFT was started. (read-only)
HRESULT StartTime([out, retval] DATE* pVal);
Example (VBScript):
MsgBox "Start date is " & oServer.StartTime
For an example using this property, refer to the Backup script in Script Examples.
EFT v6.3 and later
Sub Stop()
Stops the server.
HRESULT Stop(void);
Example (VBScript):
oServer.Stop()
EFT v6.3 and later
Function StopServerService(bstrHost As String) As Boolean
Stops EFT Server service. (Applies to EFT Enterprise only.)
HRESULT StopServerService( [in] BSTR bstrHost, //empty string means localhost [out,retval] VARIANT_BOOL* pvResult); // True=OK; False=error
Example (VBScript):
If oServer.StopServerService("192.168.0.1") Then MsgBox "EFT Service has stopped." End If
You can also use NET
STOP EFT Server Enterprise or NET
STOP EFT Server. To restart, you can use:
net stop service
name && net start service name
EFT v6.3 and later
Function TestContentIntegrityControlProfile(pProfile As Object) As Boolean
HRESULT TestContentIntegrityControlProfile([in] IDispatch* pProfile, [out, retval] VARIANT_BOOL* pVal);
Test the specified Content Integrity Control profile.
EFT v7.0.3 and later
Sub UnbanIP(bstrMask As String)
Removes denied IP mask from Autoban list for remote administration.
(Does not remove manually banned IPs. Use RemoveIPAccessRule instead.)
HRESULT UnbanIP([in] BSTR bstrMask); //mask to remove
Example (VBScript):
oServer.UnbanIP("1.2.3.4")
EFT v6.3 and later
Sub UpdateContentIntegrityControlProfile(pProfile As Object)
Update the specified Content Integrity Control profile.
HRESULT UpdateContentIntegrityControlProfile([in] IDispatch* pProfile);
EFT v7.0.3 and later
Property Uptime As ULONG
Retrieves uptime of EFT, in seconds. (read-only)
HRESULT Uptime([out, retval] ULONG* pVal);
Example (VBScript):
MsgBox "oServer up time is " & CStr(oServer.Uptime) & " seconds "
Example (C#):
seconds = m_server.Uptime; minutes = seconds / 60; //Calculate minutes seconds = seconds % 60; //leftover seconds after taking minutes out hours = minutes / 60; //Calculate hours minutes = minutes % 60; //leftover minutes after taking hours out days = hours / 24; //Calculate days hours = hours % 24; //leftover hours after taking days out Console.WriteLine(string.Format("EFT Uptime: {0} days {1} hours {2} minutes {3} seconds", days, hours, minutes, seconds));
For an example using this property, refer to the ServerStats script in Script Examples.
EFT v6.3 and later
Property UseSSLForAdministration As Boolean
Enables or disables SSL for the administration socket connection. You must restart EFT to apply changes.
HRESULT UseSSLForAdministration([out, retval] VARIANT_BOOL *pVal);HRESULT UseSSLForAdministration([in] VARIANT_BOOL newVal);
All versions
Property UseUTCInListings As Boolean
Retrieves or specifies whether to use UTC in directory listings or use the local server time.
HRESULT UseUTCInListings([out, retval] VARIANT_BOOL* pVal); HRESULT UseUTCInListings([in] VARIANT_BOOL newVal);
True=UTC; False=local server time.
Example (VBScript):
Retrieving:
If oServer.UseUTCInListings Then ' some code here Else ' another code here End If
Specifying:
oServer.UseUTCInListings = False
EFT v6.3 and later
Enable or disable logs in UTF-8 format.
HRESULT UTF8Logs([out, retval] VARIANT_BOOL *pVal); HRESULT UTF8Logs([in] VARIANT_BOOL newVal);
EFT v8 and later
Number of Workspaces seats in use.
HRESULT WSSeatsUsed([out, retval] LONG* pVal);
EFT v7.3.3 and later
HRESULT WebAdminEnabled([out, retval] VARIANT_BOOL *pVal); HRESULT WebAdminEnabled([in] VARIANT_BOOL pNewVal);
EFT v7.4.6 and later
HRESULT WebAdminPort([out, retval] LONG *pVal); HRESULT WebAdminPort([in] LONG pNewVal);
EFT v7.4.6 and later
Number of Workspaces seats activated.
HRESULT WSSeatsMax([out, retval] LONG* pVal);
EFT v7.33 and later
Number of WTC licenses in use.
HRESULT WTCSessionsUsed([out, retval] LONG* pVal);
EFT v7.3.2 and later
Property WTCSessionsMax As Long
Number of WTC licenses activated.
HRESULT WTCSessionsMax([out, retval] LONG* pVal);
EFT v7.3.2 and later
The ICIServer interface properties and methods correlate to the following fields and controls in the EFT administration interface.
Server Administration Methods and Properties
The illustration of the Server node's Administration tab below is labeled with some of the methods and properties that are available in the ICIServer interface. (Not all methods and properties are represented.)
Administrator Account Security Settings
Server ARM and Log Methods and Properties
The illustration of the Server node's Logs tab below is labeled with some of the methods and properties that are available in the ICIServer interface.
Server General Tab Methods and Properties
Server OpenPGP Keyring Methods and Properties
Server Security Methods and Properties
The ICIServer interface allows you to manage the Server, including the Server's security settings. In the administration interface, you can view/edit these settings on the Server's Security tab.
The illustrations of the Server node's Security tab below is labeled with the properties that are available in the ICIServer interface.
Server SMTP Methods and Properties
The ICIServer interface allows you to manage the Server, including the Server's SMTP settings. The illustrations of the Server node's SMTP tab below is labeled with some of the methods and properties that are available in the ICIServer interface.
Server SSL Certificate Settings
The ICIServer interface allows you to manage the Server's SSL Certificate for remote administration connections. In the administration interface, you can access the SSL certificate settings on the Administration tab by clicking Configure next to the Require SSL for remote administration check box.