6.5

Table Of Contents
Authentication Description
Command line The user name and password specied on the command line take precedence, even if a credential
store exists.
Environment variable A user name specied in an environment variable takes precedence over user names in the
credential store, but not over the command line.
Credential store The user name and password retrieved from the credential store. A custom credential store le at
a non-default location has precedence over a le at the default location.
Input, Output, and Return Codes
DCLI supports the following input arguments.
Basic types
You can enter basic types like string, int, double, or boolean on the command
line.
List types
You can provide the same option multiple times on the command line and
DCLI treats it as a list.
Currently supported output formaer types are simple, xml, html, table, csv and json. You can change the
output format by passing the formatter option to DCLI.
For scripting purposes DCLI returns a non-zero error code for an unsuccessful command. To see the last
command status in interactive mode, run the $? command.
Using DCLI with Variables
You can predene a set of variables in the environment where you run DCLI commands so you do not have
to pass the options every time you run a command. The following environment variables are supported.
Variables Supported by DCLI
Variable Description
DCLI_SERVER Set this variable to pass the server IP address.
Passing the server option on the command line overrides this variable.
DCLI_CACERTFILE Set this variable to pass the path of a CA certicate le.
Passing the cacert-file option on the command line overrides this variable.
DCLI_USERNAME Set this variable to pass the user name required for authentication.
Passing the username option on command line overrides this variable.
DCLI_CREDFILE Set this variable to point to a DCLI credential store le. Default value is
~/.dcli/.dcli_credstore.
Passing the credstore-file option on the command line overrides variable.
DCLI_HISTFILE Set this variable to point to a DCLI interactive shell history le path. Default value is
~/.dcli/.dcli_history.
DCLI_LOGFILE Set this variable to specify the log le for DCLI.
Using DCLI Interactive Mode
DCLI supports interactive shell mode which you can activate by using dcli +interactive.
Interactive mode supports tab completion of namespaces, commands, command options, and option values
in case of enumeration values. With DCLI interactive mode you can also pass a partial command if it is
uniquely resolvable. For example, dcli> com vmware vcenter vm list can also be run as dcli> vm list.
Getting Started with vSphere Command-Line Interfaces
50 VMware, Inc.