DCLI Syntax
Each DCLI command
uses the same syntax.
The command name can be
followed by DCLI connection and formatting options, each preceded by a plus
(
+
) sign. You also specify the namespace, the command, and the
command options. Namespaces are nested.
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-specific
options with two minus signs (--
).
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
| Predefined options for
connection information including the
vSphere
Automation SDK endpoint and formatting options. Always preceded
by a plus (+ ) sign.
Not required when you
run the command in the
shell or from the command prompt of a
Windows installation.
|
namespace
| Groups
DCLI commands. Namespaces correspond to the
vSphere
Automation SDK namespaces and are nested. |
command
| Reports on
or modifies the state of the system. |
option and
value | Command option and value
pairs preceded by two minus signs ( -- ).
|
Examples
./dcli +server myvc com vmware vcenter vm list
./dcli com vmware vmc orgs sddcs list --org orgID +vmc-server
Under Windows, you can
navigate to the directory that contains the DCLI binary and start commands with
dcli
instead of
./dcli
.