ESXCLI Syntax
Each ESXCLI
command uses the same syntax.
The following is the standard
syntax structure of an ESXCLI command.
esxcli [connection options] <namespace> [<namespace> ...] <cmd> [cmd options]
Syntax Element | Description |
---|---|
connection options
| Predefined options for
connection information such as target host, user name, and so on. See
Running ESXCLI Host Management Commands.
Not required when you run the command in the
ESXi Shell. If
the target server is a
vCenter Server
system, specify the target
ESXi host
before any ESXCLI namespaces, commands, and supported options.
Many ESXCLI commands generate output that you might
want to use in your application. You can run esxcli with
the --formatter dispatcher option and send the
resulting output as input to a parser. ESXCLI expects a trust
relationship between the target host and the system on which you run the
command. You can establish this relationship in one of the following
ways.
You can pass in the
thumbprint that is returned in the error if you trust the host that
you are targeting. See Trust Relationship Requirement for ESXCLI Commands
for an example. |
namespace
| Groups ESXCLI commands. Nested namespaces are supported. |
command
| Reports on or modifies
the state of the system.
The following examples
show how you can use this element.
|
options
| Many commands support one or more of the options
displayed in the help or the ESXCLI reference. For some commands,
multiple option values, separated by spaces, are possible. The following example
shows how you can use this element.
|