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 [+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] [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 both Linux and Windows 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 that option.

The following table describes the DCLI options.

Option

Description

Default

server

The vCenter Server system to which DCLI connects.

localhost

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.

 

prompt

Prompt that the interactive shell uses.

dcli>

skip-server-verification

Skips the server SSL verification process.

False

cacert-file

Specifies the certificate authority certificates for validating SSL connections.

 

more

Displays page-wise output.

 

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.

loglevel

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

debug

info

warning

error

info

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.

 

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 file name 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

credstore-add

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

This option stores the server IP address, session manager, username and password for the command being executed. If an entry already exists, the command updates the entry.

dcli directory inside the home directory.

$HOME/.dcli

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.

 

credstore-list

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

 

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.