Reference: Tanium Core Platform Command-line interface in a Windows deployment
You can use the command-line interface (CLI) to configure platform settings.
To access the CLI for a Tanium Core Platform component, open the Command Prompt and navigate to the directory where the component CLI program reside. The following table lists the directories. For descriptions of the settings that you can edit, see Deployment-related settings reference.
|
Component |
CLI program location |
|---|---|
|
Tanium Server |
Program Files\Tanium\TaniumReceiver.exe |
|
Tanium Module Server |
Program Files\Tanium\TaniumModuleServer.exe |
|
Tanium Zone Server or Tanium Zone Server Hub |
Program Files (x86)\Tanium\Tanium Zone Server\TaniumZoneServer.exe |
|
TDownloader |
Program Files\Tanium\Tanium Server\TDownloader.exe |
| Program Files\Tanium\Tanium Module Server\TDownloader.exe |
CLI examples
The following examples show how to use the CLI.
Display help
cmd-prompt> --help
Usage: [options] <command> [<args>]
General Options:
-h [ --help ] Print this help message
-v [ --version ] Print the version
--verbose Verbose output
Service Options:
-i Install the service
-u Uninstall the service
-s Start the service
-e Stop the service
Internal Tanium Options - DO NOT USE:
-d Run without daemonizing
Commands:
config Manage configuration
clean-downloads Clean the downloads catalog
database Manages a database
global-settings Manages global settings
license Manages Deployment License
pki Manages PKI
registration-secret Manages Client registration secrets
server-registrations Manages Server registration requests
test-hsm Test an HSM configuration
trust-module-certs Add trusted Module Server certificates
For help on a specific command run ` COMMAND -h`
Display config help
cmd-prompt> config --help
Usage: config <action> [<key>] [<value>]
Actions:
config list List all keys and non-protected values
config list-protected List all keys and values
config get <key> Print non-protected config value
config get-protected <key> Print config value
config set <key> <value> Set config value and try to guess type
config set-string <key> <value> Set string value
config set-protected <key> <value> Set protected string value
config set-number <key> <value> Set numeric value (in decimal or hex notation)
config remove <key> Remove config value
Example: List configuration settings
When displaying the current settings, note that the CLI output displays (protected) instead of the actual value for settings that are designated as protected, which means they are sensitive in the security sense.
cmd-prompt> config list
Keys:
- AddressMask: 16777215
- ConsoleSettingsJSON: C:\Program Files\Tanium\Tanium Server\http\config\console.json
- DBUserDomain: tam.local
- DBUserName: taniumsvc
- LogPath: C:\Program Files\Tanium\Tanium Server\Logs
- LogVerbosityLevel: 1
- Logs:
- Logs.MiniDumpMessages:
- Logs.MiniDumpMessages.FilterRegex: .*Begin MiniDumper.*
- Logs.MiniDumpMessages.LogVerbosityLevel: 1
- ModuleServer: tms1.tam.local,TMS1.tam.local:17477
- ModuleServerPort: 17477
- PGDLLPath: C:\Program Files\Tanium\Tanium Server\postgres\bin
- PKIDatabasePassword: (protected)
- PGRoot: C:\Program Files\Tanium\Tanium Server\postgres
- Path: C:\Program Files\Tanium\Tanium Server
- ProxyPassword: (protected)
- ProxyPort:
- ProxyServer:
- ProxyType: NONE
- ProxyUserid:
- SQLConnectionString: postgres:localhost@dbname=postgres port=5432
- ServerName: 0.0.0.0
- ServerPort: 17472
- ServerSOAPPort: 443
- TrustedCertPath: C:\Program Files\Tanium\Tanium Server\Certs\installedcacert.crt
- TrustedModuleServerCertsPath: C:\Program Files\Tanium\Tanium Server\trusted-module-servers.crt
- Version: 7.9.3.1234
Example: Set configuration values
cmd-prompt> config set BypassProxyHostList host1.example.com,192.168.0.1
cmd-prompt> config get BypassProxyHostList
host1.example.com,192.168.0.1
Example: Set configuration values
cmd-prompt> config set ProxyServer 192.168.0.2
cmd-prompt> config get ProxyServer
192.168.0.2
Example: Register the Module Server with the Tanium Server
On the Module Server host computer, use the CLI to register with a Tanium Server. Specify a Tanium Console administrator user name and password.
After registering the Module Server, you must restart the services for the Tanium Module Server and all Tanium modules and shared services. On the Module Server, open the Windows Services application and, for each service, right-click the service name and select Restart.
cmd-prompt>TaniumModuleServer register -h
Usage: TaniumModuleServer register <server> [opts]
--server arg Tanium Server hostname (optionally including
port)
--address arg (=TMS1.tam.local) DNS name or IP that the Tanium Server should
use to connect to this Module Server
--timeout arg (=120) Registration timeout in seconds
--user arg Administrator username
--pass arg Administrator password (leave blank for
interactive prompt)
--pass-file arg Administrator password protected file
--trusted-fingerprint arg Trust the given server certificate
fingerprint
--json-out arg JSON file to output results to
cmd-prompt>TaniumModuleServer register ts2.tam.local
Enter administrator username: TaniumAdmin
Enter password for user 'TaniumAdmin':
Successfully completed registration.
If Tanium Console has been configured to use a non-standard port, you must specify the port number, as shown in the following example.
cmd-prompt>TaniumModuleServer register ts2.tam.local:8443
Enter administrator username: TaniumAdmin
Enter password for user 'TaniumAdmin':
Successfully completed registration.
cmd-prompt>
If Tanium Console is not listening on 443 and you do not specify the port in the registration command, the registration results in failure with the message:
Failed to register Module Server. Failed to authenticate for registration. SSLClientConnection has failed to complete request.
Example: Configure global settings
cmd-prompt> global-settings -h
Usage: global-settings list|list-all|get|set|set-string|set-numbe
r|set-flags|unset-flags|remove
-c [ --command ] arg Command to run:
list
list-all
get <setting>
set <setting> <value>
set-string <setting> <value>
set-number <setting> <value>
set-flags <setting> [public|hidden|read-only|server...]
unset-flags <setting> [public|hidden|read-only|server ...]
remove <setting>
cmd-prompt> global-settings set ReportingTLSMode 0
Example: Add an administrator user
cmd-prompt> -h
Usage: database create|upgrade|create-admin-user
-c [ --command ] arg Command to run:
create
upgrade
create-admin-user [username] [domain]
sqlserver2postgre outputfile
cmd-prompt> database create-admin-user admin-recover tam.local