ICIServer - Server Interface

Use the ICIServer interface to manage the Server and access the Server's attributes. Click the links in the Members column to view the dialog box equivalents.

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 Server's administrative subsystem listened on only one IP address; instead use ListenIPs in v6.4 and later.

  • CreateAutomationAdmin is almost the same as CreateAdmin: in 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 COM API, operates via the COM API, and does not require an initial password change.

 

Members

How it's used

Applicable Version

Property ActiveDownloads As Long read-only

Retrieve 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

Retrieve the number of active uploads.

HRESULT ActiveUploads(

[out, retval] LONG* pVal);

Example (VBScript):

MsgBox “Active uploads “ & CStr(oServer.ActiveUploads)

EFT v6.3 and later

Sub AddIPAccessRule (bstrMask As String, bAllow As Boolean, nRulePos As Long)

See also GetIPAccessRules and RemoveIPAccessRule, and the following interfaces:

Adds allowed or denied IP mask for administration.

HRESULT AddIPAccessRule(

[in] BSTR bstrMask,

[in] VARIANT_BOOL bAllow,

[in] long nRulePos) //position in list (0 is first)

Example (VBScript):

oServer.AddIPAccessRule("1.2.3.4", false, 2)

EFT v6.3 and later

Property AdminAccounts As Variant read-only

 

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.

Retrieve 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

Retrieve or specify 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

Allow or prohibit 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

Allow or prohibit remote administration of the server.

HRESULT AllowRemoteAdministration([out, retval] VARIANT_BOOL *pVal);

HRESULT AllowRemoteAdministration([in] VARIANT_BOOL newVal);

All versions

Property AllowUnprotectedDataChannel As Boolean

Allow or prohibit 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

Sub ApplyChanges()

Apply changes to confirm and set changes you have made. (Any "Set" or "Write" method applies the change made immediately.)

HRESULT ApplyChanges();

All versions

Property ARMAuthenticationType As ARMAuthenticationType

For an example using this property, refer to the BackupEx script in Script Examples.

Retrieve or specify 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

Property ARMDatabaseName As String

For an example using this method, refer to the BackupEx script in Script Examples.

Retrieve or specify 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

Retrieve or specify 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

Retrieve or specify 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

Retrieve or specify 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<SomeAddr@SomeMailServer.com>"

oServer.ARMFailureEmailList = strEmailList

EFT v6.3 and later

Property ARMPassword As String

For an example using this method, refer to the BackupEx script in Script Examples.

Retrieve or specify 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

Property ARMServerName As String

For an example using this method, refer to the BackupEx script in Script Examples.

Retrieve or specify 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

Retrieve or specify 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.

Retrieve or specify 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.

Retrieve or specify t 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

Retrieve or specify 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 and later

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

Property AvailableEvents As Variant read-only

Retrieve a list of the Events defined on EFT. Its value is a variant containing the array of ICIEventInfo interfaces.

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 interfaces.

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

Property AvailableReports As Variant read-only

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 interface:

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

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 and later

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

Sub BackupServerConfiguration(bstrFilePath As String)

For an example using this method, refer to the Backup script in Script Examples.

Retrieve or specify 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

Property CertificateFilePath As String

Retrieve or specify 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.

 

Retrieve or specify 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

Property ConfigurationFilePath As String

Retrieve or specify 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 version EFT Server 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

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 the server.

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 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 COM 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 the server.

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_3DES = 1

PGPKeyCipher_AES128 = 3

PGPKeyCipher_AES192 = 4

PGPKeyCipher_AES256 = 5

PGPKeyCipher_CAST5 = 2

PGPKeyCipher_IDEA = 0

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 and later

Sub CreateSSHKey(nKeyBits As Long, bstrPassword As String, bstrPrivateKeyFile As String, bstrPublicKeyFile As String, vbComFormat As Boolean, nSiteId As Long, bstrCopyTo As String)

Create an SSH Key on the server.

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

Sub CreateSSLCertificate(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 the server.

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):

oServer.CreateSSLCertificate "C:\Cert.key", "C:\Cert.csr", "C:\Cert.crt", "passphrase", "RU", "Perm", "Perm", "MIA", "6", "q", "petrenko@mail.com", 1024, 21, PEM, PEM, 0, False, False

EFT v6.3 and later

Property DefaultPollTimeout As Long

Retrieve or specify 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

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

Property EnableARM As Boolean

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

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 and later

Sub ExportSSHKey(lKeyID As Long, bzKeyFilePath As String)

For an example using this method, refer to the SSH script in Script Examples.

Export an SSHKey.

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);

EFT v6.3 and later

Sub GenerateReport(pdispReportParams As Object, bzReportPath As String)

Generate an EFT report.

HRESULT GenerateReport(

IDispatch* pdispReportParams, //

[in] ICIReportActionParams interface // containing report parameters

BSTR bzGeneratedReportPath); //

[in] Local file to put the report to

Example (VBScript):

Set ReportParams = CreateOb-ject("SFTPCOMInterface.CIReportActionParams")

'Setup report name, filters, period

' ...

ReportParams.ReportFileFormat = PDFFormat

Server.GenerateReport(ReportParams, "C:\Report\Report.pdf")

EFT v6.1 and later

Function GetAdminIPs() As Variant

Retrieve an array of IP addresses for the computer on which the Server 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

Retrieve or specify 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 GetIPAccessRules() As Variant

See also AddIPAccessRules, RemoveIPAccessRule, MoveIPAccessRule methods, and the following interfaces:

Retrieve an array of administration IP address access rules.

HRESULT GetIPAccessRules(

[out, retval] VARIANT *aMasks);

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 the server'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

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");

EFT v6.3 and later

Function GetServerAdminCount() As Long

Retrieve a count of administrator accounts defined on the server.

HRESULT GetServerAdminCount(

[out,retval] long* lCount);

Example (VBScript):

Dim i : i = oServer.GetServerAdminCount()

EFT v4.3.4 and later

Sub ImportPGPKey(bstrKey As String, bstrKeyFile As String)

Import an OpenPGP key.

HRESULT ImportPGPKey(

[in] BSTR bstrKeyPath,

[out, retval] BSTR* pNewKeyID);

Example (VBScript):

KeyId = oServer.ImportPGPKey("C:\PGP\pgpkey.asc")

EFT v6.3 and later

Function ImportSSHKey(bstrKeyPath As String) As Long

For an example using this method, refer to the PGP script or SSH script in Script Examples.

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);

EFT v6.1 and later

Property IPAccessAllowedDefault As Boolean

Retrieve or specify the default IP Access restriction list.

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 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 server is started.

HRESULT IsStarted(

[out, retval] VARIANT_BOOL* pVal);

Example (VBScript):

If Not oServer.IsStared Then

oServer.Start()

End If

EFT v6.3 and later

Property KeyFilePath As String

Retrieve or specify the file path for the server's private key files.

HRESULT KeyFilePath(

[out, retval] BSTR *pVal);

HRESULT KeyFilePath(

[in] BSTR newVal);

All versions

Property LastModifiedBy As String read-only

 

See also LastModifiedTime, below.

 

For an example using this property, refer to the ServerStats script in Script Examples.

Retrieve the name of the user who last modified the server.

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));

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 the server 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 ListenIP As Long

 

In version 6.4 and later, use ListenIPs, below, instead.

Retrieve or specify the server's IP address.

HRESULT ListenIP(

[out, retval] long *pVal);

HRESULT ListenIP(

[in] long newVal);

All versions

Property ListenIPs As Variant

 

Replaces ListenIP, above.

Retrieve or specify the IP addresses on which the server listens.

HRESULT ListenIPs(

[out, retval] VARIANT* pVal);

HRESULT ListenIPs(

[in] VARIANT newVal);

EFT v6.4 and later

Property LogMode As LogMode

Retrieve or specify whether to use standard or verbose logging.

HRESULT LogMode(

[out, retval] LogMode* pVal);

HRESULT LogMode(

[in] LogMode newVal);

Example (VBScript):

Retrieving:

If LogModeStandard = oServer.LogMode

' some code

End If

Specifying:

oServer.LogMode = LogModeVerbose

EFT v6.3 and later

Property LogPath As String

Retrieve or specify the file path to the Server's log. You must restart the Server to complete any changes to the server's 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

Retrieve or specify 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 server 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 LogType As Int

Retrieve or specify the server'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 server for any changes to the log format to take effect.

HRESULT LogType(

[out, retval] int *pVal);

HRESULT LogType(

[in] int 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

Function ModuleRegistrationState(m As ServerModule) As RegistrationState

Retrieve the registration status of EFT modules.

HRESULT ModuleRegistrationState(

[in] ServerModule m,

[out, retval] RegistrationState* pRS);

Example (VBScript):

If Server.ModuleRegistrationState(EFTServer) = Expired Then

MsgBox "EFT is not 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:

Change allowed 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

Retrieve or specify an SSL certificate private key passphrase.

HRESULT PassPhrase(

[out, retval] BSTR *pVal);

HRESULT PassPhrase(

[in] BSTR newVal);

All versions

Sub RefreshSettings()

Used to update the COM object with the latest set of data from the Server. 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:

Remove allowed or denied IP mask for administration.

HRESULT RemoveIPAccessRule(

[in] long nRulePos); //position

Example (VBScript):

oServer.RemoveIPAccessRule(0)

EFT v6.3 and later

Sub RemovePGPKey(bstrKeyId As String)

Remove OpenPGP Key from the server.

HRESULT RemovePGPKey(

[in] BSTR bstrKeyId);

Example (VBScript):

oServer.RemovePGPKey "0x01234567"

EFT v6.3 and later

Sub RemoveServerAdminAccount(bstrAdminUser As String, [accountType As AdminAccountType = 0])

Remove an administrator account from the server.

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)

For an example using this method, refer to the SSH script in Script Examples.

Remove an SSH public key from the server.

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 and later

Sub RenameSSHKey(lID As Long, bstrNewName As String)

For an example using this method, refer to the SSH script in Script Examples.

Rename 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 and later

Property RequireStrongPasswords As Boolean

Retrieve or specify 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)

Restore a backed up server 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)

For an example using this method, refer to the Backup script in Script Examples.

Restore server configuration.

HRESULT RestoreServerConfigurationEx(

[in] IDispatch* pVal);

Retrieve backup information with GetBackupArchiveInfo.

Example (VBScript):

oServer.RestoreServerConfigurationEx oBackupSettings

EFT v6.3 and later

Sub SetComplexPasswordSettings(pIComplexPasswordSettings As CIComplexPasswordSettings)

Change complex password settings.

HRESULT SetComplexPasswordSettings(

[in]IDispatch** pIComplexPasswordSettings);

Retrieve 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.

Change 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"

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");

EFT v6.3 and later

Sub SetSSLCertificate(bzCertFilePath As String, bzKeyFilePath As String, bzPassPhrase As String)

Specify 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

Sub SignSSLCertificate(bstrRequest As String, bstrServCert As String, bstrPrivateKey As String, bstrPass As String, bstrOutCert As String, nDays As Long)

Sign 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

Function Sites() As CISites

For an example using this method, refer to the ServerIPBanEntry or RemoveSite script in Script Examples.

Retrieve 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();

All versions

Property SMTPAddressBook As String

Retrieve or specify 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@SomeServer.com>“

oServer.SMTPAddressBook = strEmailList

EFT v6.3 and later

Property SMTPLogin As String

Retrieve or specify the username for the email server used by the Server for event notifications, if authentication is required.

HRESULT SMTPLogin(

[out, retval] BSTR *pVal);

HRESULT SMTPLogin(

[in] BSTR newVal);

All versions

Property SMTPPassword As String

Retrieve or specify the password for the email server used by the Server for event notifications, if authentication is required.

HRESULT SMTPPassword(

[out, retval] BSTR *pVal);

HRESULT SMTPPassword(

[in] BSTR newVal);

All versions

Property SMTPPort As Long

Retrieve or specify the port number for connection to the SMTP server used by the Server for event notifications.

HRESULT SMTPPort(

[out, retval] long *pVal);

HRESULT SMTPPort(

[in] long newVal);

All versions

Property SMTPRecipientAddr As String

Retrieve or specify the email address of the recipient notifications sent by the Server.

HRESULT SMTPRecipientAddr(

[out, retval] BSTR *pVal);

HRESULT SMTPRecipientAddr(

[in] BSTR newVal);

All versions

Property SMTPRecipientName As String

Retrieve or specify the administrator email name for email notifications sent by the Server.

HRESULT SMTPRecipientName(

[out, retval] BSTR *pVal);

HRESULT SMTPRecipientName(

[in] BSTR newVal);

All versions

Property SMTPSenderAddr As String

Retrieve or specify the administrator email address for email notifications sent by the Server.

HRESULT SMTPSenderAddr(

[out, retval] BSTR *pVal);

HRESULT SMTPSenderAddr(

[in] BSTR newVal);

All versions

Property SMTPSenderName As String

Retrieve or specify the From name used in email notifications sent by the Server.

HRESULT SMTPSenderName(

[out, retval] BSTR *pVal);

HRESULT SMTPSenderName(

[in] BSTR newVal);

All versions

Property SMTPServer As String

Retrieve or specify the address for the email server used by the Server for sending event notifications.

HRESULT SMTPServer(

[out, retval] BSTR *pVal);

HRESULT SMTPServer(

[in] BSTR newVal);

All versions

Property SMTPUseAuthentication As Boolean

Retrieve or specify 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

Property SSHFIPSEnabled As Boolean

Retrieve or specify whether FIPS SSH is enabled. Requires server restart of the server.

HRESULT SSHFIPSEnabled(

[out, retval] VARIANT_BOOL* pVal);

HRESULT SSHFIPSEnabled(

[in] VARIANT_BOOL newVal);

EFT v6.3 and later

Property SSLFIPSEnabled As Boolean

Retrieve or specify whether FIPS SSL is enabled. Requires server 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

Property SSLVersionMask As Int

Retrieve or specify 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()

Start the server.

HRESULT Start(void);

Example (VBScript):

oServer.Start()

EFT v6.3 and later

Function StartServerService(bstrHost As String) As Boolean

 

For an example using this property, refer to the Backup script in Script Examples.

Start the 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 read-only

Retrieve the date and time when the server was started.

HRESULT StartTime(

[out, retval] DATE* pVal);

Example (VBScript):

MsgBox "Start date is " & oServer.StartTime

EFT v6.3 and later

Sub Stop()

Stop the server.

HRESULT Stop(void);

Example (VBScript):

oServer.Stop()

EFT v6.3 and later

Function StopServerService(bstrHost As String) As Boolean

 

 

Stop the server service.

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

EFT v6.3 and later

Sub UnbanIP(bstrMask As String)

Remove denied IP mask from Autoban list for administration.

HRESULT UnbanIP(

[in] BSTR bstrMask); //mask to remove

Example (VBScript):

oServer.UnbanIP("1.2.3.4")

EFT v6.3 and later

Property Uptime As ULONG (read-only)

 

For an example using this property, refer to the ServerStats script in Script Examples.

Retrieve uptime of the server in seconds.

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} day(s) {1} hour(s) {2} minute(s) {3} second(s)", days, hours, minutes, seconds));

EFT v6.3 and later

Property UseSSLForAdministration As Boolean

Enable or disable SSL for the administration socket connection. You must restart the server to apply changes.

HRESULT UseSSLForAdministration(

[out, retval] VARIANT_BOOL *pVal);

HRESULT UseSSLForAdministration(

[in] VARIANT_BOOL newVal);

All versions

Property UseUTCInListings As Boolean

Retrieve or specify 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

Dialog Box Equivalents

The ICIServer interface properties and methods correlate to the following fields and controls in the EFT Server 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 in the GUIs.)

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. (Not all methods and properties are represented in the GUIs.)

Server General Methods and Properties

Server IP Access Rules 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 illustration of the Server node's Security 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 in the GUIs.)

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. (Not all methods and properties are represented in the GUIs.)

Server SSH Key Manager Methods and Properties

Server SSL Certificate Methods and Properties

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.