Using the command line interface
FileMaker provides the tool fmsadmin for administering FileMaker Server via the command line interface (CLI). You must be logged on to the computer running FileMaker Server, either directly or using remote desktop software, to use the CLI. The CLI is available via the command prompt (Windows) and the Terminal application (macOS). CLI commands can also be used in a script or batch file.
Windows: If FileMaker Server is installed in a non-default location, the beginning portion of the default path shown above, \Program Files\FileMaker\FileMaker Server, is replaced with the path that was specified during installation. For example: \My_Path\Database Server\
macOS: The following symbolic link to fmsadmin is also installed: /usr/bin/fmsadmin
CLI help
In the CLI, use the help command to see Help pages that list what commands and options are available and how to use them:
fmsadmin help
CLI commands
The general format for fmsadmin commands is:
fmsadmin command [options]
The following example authenticates with Admin Console user name admin and the password pword, and closes all open databases without prompting you to confirm:
fmsadmin close -y -u admin -p pword
Important  CLI commands can include the Admin Console name and password. If a command is used interactively, the user name is visible but the password is not. If a command in a script or batch file must include a name and password, be sure that only the password owner can view the script or batch file.
CLI files
The CLI executable fmsadmin is located in the folder:
Windows: [drive]:\Program Files\FileMaker\FileMaker Server\Database Server\fmsadmin.exe
macOS: /Library/FileMaker Server/Database Server/bin/fmsadmin