'*************************************************************** Set SFTPServer = WScript.CreateObject("SFTPCOMInterface.CIServer") CRLF = (Chr(13)& Chr(10)) txtServer = "localhost" txtPort = "1100" Auth = 1 txtAdminUserName = "" txtPassword = "" If Not Connect(txtServer, txtPort, Auth, txtAdminUserName, txtPassword) Then WScript.Quit(0) End If 'AdminLoginType: EFTLogin = 0 IWALogin = 1 NetLogon = 2 'Backup our EFT configuration 'SFTPServer.BackupServerConfiguration "D:\Backup\BackupConfig.bak" 'Get our archive information into a CIBackupArchiveInfo object 'Set archive = SFTPServer.GetBackupArchiveInfo("D:\Backup\BackupConfig.bak", EFTLogin, txtAdminUserName, txtPassword ) Set archive = SFTPServer.GetBackupArchiveInfo("D:\Backup\BackupConfig.bak", IWALogin, "", "" ) 'Get the site backup info for the first site for i = 0 to archive.SitesCount - 1 Set siteBackupInfo = archive.GetSiteBackupInfo( i ) WScript.Echo "Site = " & siteBackupInfo.SiteName WScript.Echo "DMZGW enabled = " & siteBackupInfo.DMZEnabled WScript.Echo "DMZGW address = " & siteBackupInfo.DMZAddress ' To change the site DMZAddress ' siteBackupInfo.DMZEnabled = True siteBackupInfo.DMZAddress = "192.168.100.15" ' WScript.Echo "Changing DMZGW address to " & siteBackupInfo.DMZAddress archive.SetSiteBackupInfo( siteBackupInfo ) Next 'Restore our configuration SFTPServer.RestoreServerConfigurationEx archive 'Restore does not start the service, so start it ourselves SFTPServer.StartServerService "localhost" ' WScript.Echo "Done" SFTPServer.Close Set SFTPServer = nothing Function Connect (serverOrIpAddress, port, Auth, username, password) On Error Resume Next Err.Clear SFTPServer.ConnectEx serverOrIpAddress, port, Auth, username, password If Err.Number <> 0 Then WScript.Echo "Error connecting to '" & serverOrIpAddress & ":" & port & "' -- " & err.Description & " [" & CStr(err.Number) & "]", vbInformation, "Error" Connect = False Exit Function End If Connect = True End Function