Applies to: Server!
Version(s): 4.x - 5.x
Warning:    this articles refers to an older version of our software

As many of you already know, Server! is used by both small/medium businesses as well as large enterprises. The latter often requires a very high degree of automation and integration in their existing systems and procedures. For such reason, the  CLI (Command-Line Interface) if very frequently used to modify the server’s configuration and create/edit user profiles.

But writing an extensive command-line may not always be as easy as System Administrators wish. Opening a CMD or a PowerShell and typing a very long multi-line command with tens of switches maybe, at times, a challenging task.

Therefore, Server! features import/export of configuration and user profiles from/to standard JSON-formatted files.

You can, for instance, export your entire configuration with a single, simple and short CLI command, as follows:

SMSCLI -a admin -p **** -json exportconf -file C:\wrk\myconf.json

Once exported to a JSON-formatted text file, your configuration can be edited with any Notepad application, including the default Windows Notepad if you want to. The file looks like this:

      "Active": true,
      "Protocol": "SSH",
      "IPAddr": "",
      "Port": 22,
      "IPVer": 4,
      "HostName": ""
      "Active": true,
      "Protocol": "FTP",
      "IPAddr": "",
      "Port": 21,
      "IPVer": 4,
      "HostName": ""
      "Active": true,
      "Protocol": "FTPS",
      "IPAddr": "",
      "Port": 990,
      "IPVer": 4,
      "HostName": ""
  "DefSSHPort": 22,
  "DefHTTPPort": 80,
  "DefHTTPSPort": 443,
  "DefFTPCPort": 21,
  "DefFTPDPort": 20,
  "DefFTPSCPort": 990,
  "DefFTPSDPort": 989,
  "MaxConn": 30,
  "MaxSubConn": 5,
  "ConnDelay": 0,
  "Timeout": 120,
  "MaxTries": 3,
  "BLWindow": 20,
  "BLTime": 15,
      "Event": "OnAuthRequest",
      "Priority": 10,
      "ScriptID": "{00000}"
      "Event": "OnAuthPassword",
      "Priority": 15,
      "ScriptID": "{00000}"
  "FTPCertPass": "",
  "FTPTLSMode": 2,
  "ModeZ": true,
  "GreetBanner": " FTP/S Server for Windows ready.",
  "GreetLogin": "Welcome! You have successfully logged in.",
  "GreetLoginFail": "Login failed. Please check your authentication credentials.",
  "GreetLogout": "Bye, see you soon!",
  "PasvMinPort": 64000,
  "PasvMaxPort": 65000,
  "SameIPonPasv": true,
  "SameIPonPort": true,
  "AllowCCC": false,
  "BlockPORT": false,
  "DisableSTAT": false,
  "DisableSYST": false,
  "NoRangePORT": false,
  "AllowedSSLVer": "0,1,1,1,1",
  "AllowedCipherSuites": "0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,1,1,0,..........",
  "ExtPasvIP": "",
  "SSHBanner": " SSH/SFTP Server for Windows",
  "SSHGreeting": " Server! SSH-2/SFTP Service Ready",
  "SSHServerKey": "-----BEGIN RSA PRIVATE KEY-----\r\nMIICXQIBAAKBgQDyXHdJJIXk7aop........",
  "SSHZCompress": true,
  "OverrideTimeout": false,
  "SFTPVerList": "3,4,5,6",
  "AuthList": "0,1",
  "MacList": "0,5,6,7,8,10,11,12,13",
  "CryptoList": "1,2,3,4,5,6,7,8,9,10,11,12,13,16,17,18,20,21,22,23,24,25,26,27,28,29,30",
  "ForceUTF8": true,
  "HTTPCert": "",
  "HTTPGZip": false,
  "SMTPHost": "",
  "SMTPPort": 587,
  "SMTPSender": "",
  "SMTPUser": "",
  "SMTPPass": "7C1FDDFD40762FC363DACF64622D",
  "SMTPTLS": 1,
  "LogTo": 0,
  "LogDetail": "Verbose",
  "LogDest": "C:\\ProgramData\\\\Server!\\Logs\\"

And once you’ve made all the necessary edits, you can simply  save the JSON-formatted configuration and re-import it into Server! with another extremely easy and short CLI command:

SMSCLI -a admin -p **** -json importconf -file C:\wrk\myconf.json

The same goes for user profiles, of course.