You can run each DCLI command with connection or formatting options preceded by a + sign.

For many of the options, you can instead use variables. See Using DCLI with Variables.

dcli [+vmc-server]
     [+nsx-server NSX_T_SERVER_ADDRESS]
     [+server SERVER_IP]
     [+interactive]
     [+prompt PROMPT]
     [+skip-server-verification]
     [+cacert-file CACERT_FILE]
     [+more]
     [+formatter {simple,table,xml,json,html,csv}]
     [+loglevel {debug, info, warning, error}]
     [+username USERNAME] [+password]
     [+credstore-file CREDSTORE_FILE]
     [+credstore-add | +credstore-remove | +credstore-list]
     [+session-manager SESSION_MANAGER]
     [+configuration-file CONFIGURATION_FILE]
     [args [args ...]]

With these options, you can provide the following information. If you are entering options in DCLI interactive mode, tab completion is supported on Linux, Windows, and Mac OS systems. In all cases, you can specify a partial option if the option is not ambiguous. For example, +i indicates interactive, but you have to specify, at least, +credstore-a to disambiguate option +credstore-add.

The following table describes the DCLI options.

Option

Description

Default

Available in Interactive Mode

vmc-server

The VMware Cloud on AWS server to which DCLI connects.

https://vmc.vmware.com

No

nsx-server

The NSX-T server to which DCLI connects.

 

No

server

The vCenter Server system to which DCLI connects.

localhost

No

interactive

Runs DCLI in interactive shell mode, which supports tab completion of commands, options, and some option values. It also supports saving the command history across DCLI sessions.

Interactive mode is faster because DCLI caches the list of commands available on a vCenter Server system.

 

No

prompt

Prompt that the interactive shell uses.

dcli>

No

skip-server-verification

Skips the server SSL verification process.

False

No

cacert-file

Specifies the certificate authority certificates for validating SSL connections.

 

No

more

Displays page-wise output.

 

Yes

formatter

Output formatter, which has one of the following possible values.

simple

table

xml

json

html

csv

Default is table for lists of structures and simple for all other output including json.

Yes

loglevel

The log level, which has one of the following possible values.

debug

info

warning

error

info

Yes

username

If you run from the local shell, most DCLI commands do not require the user name. If you are running vCLI commands, the user you specify must be able to authenticate to the vCenter Server system.

The user you specify must have the privileges to perform the task, as specified through vCenter Server roles.

You are prompted for the password. The password is not echoed to screen.

Note

Only available when DCLI connects to a vCenter Server system.

 

Yes

password

You can use this option to provide your password explicitly instead of waiting for the DCLI password prompt.

Important

Providing the value explicitly presents a security risk.

Note

Only available when DCLI connects to a vCenter Server system.

 

Yes

credstore-file

Path to the credential store file to use for credential store operations or for reading login credentials.

Use this option only if the default credential store filename does not work in your environment.

By default, the credential store file is in the .dcli/.dcli_credstore directory inside the home directory.

$HOME/.dcli/.dcli_credstore

Yes

credstore-add

Adds login credentials entered for a command to the DCLI credential store file.

If the provided credentials are valid, this option stores the server IP address, session manager, user name, and password for the command being run. If an entry exists, the command updates the entry.

 

Yes

credstore-remove

Removes an entry from the DCLI credential store file.

This option removes the entry for a specified server IP address and user name if only one session manager is present for a target server and user.

In rare cases, information about multiple session manager entries is present. You must provide the session manager with the session-manager option.

 

Yes

credstore-list

Lists all entries stored in the DCLI credential store file. Each entry includes the server IP address, session manager, and user name.

 

Yes

session-manager

Use this option if you use the credstore-remove option the same user name and password are stored through multiple session managers. Not usually required.

 

Yes

configuration-file

Path to the configuration store file to use for options and profile-related internal commands.

$HOME/.dcli/.dcli_configuration

No