Each ESXCLI command uses the same syntax.
The following is the standard syntax structure of an ESXCLI command.
esxcli [dispatcher options] <namespace> [<namespace> ...] <cmd> [cmd options]
Predefined options for connection information such as target host, user name, and so on. See Running vCLI 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. Important
Starting with vSphere 6.0, 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 these 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. |
|||||||