6.5

Table Of Contents
n
Prepare scripts that contain DCLI commands. Then run the scripts as vCLI scripts, from the
vCenter Server Windows command prompt, or from the vCenter Server Appliance shell. Use the
credential store options to authenticate. Passwords are not supported in scripts.
DCLI Syntax
Each DCLI command uses the same syntax.
The command name can be followed by DCLI connection and formaing options, each preceded by a plus
(+) sign. You also specify the namespace, the command, and the command options. Namespaces are nested.
N The order in which DCLI options are provided on the command line is not important. However, you
must specify DCLI options with a plus (+) and command-specic options with a minus (-).
The syntax of a DCLI command is the following.
dcli +[DCLI options] <namespace> [<namespace> ...] <cmd> --[cmd option] [option value]
The following table describes the DCLI syntax elements.
Syntax Element Description
DCLI options
Predened options for connection information including the vSphere Automation SDK endpoint
and formaing options. Always preceded by a plus (+) sign.
Not required when you run the command in the vCenter Server Appliance shell or from the
command prompt of a vCenter Server Windows installation.
namespace
Groups DCLI commands. Namespaces correspond to the vSphere Automation SDK namespaces
and are nested.
command
Reports on or modies the state of the system.
option and value Command option and value pairs preceded by two minus signs (--).
Example
$dcli +server my_remote_vc +username user42 com vmware cis tagging tag list
DCLI Options
You can run each DCLI command with connection or formaing options preceded by a + sign.
For many of the options, you can instead use variables. See “Using DCLI with Variables,” on page 50.
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.
Getting Started with vSphere Command-Line Interfaces
46 VMware, Inc.