You can pass in command-line options by using option name and option value pairs in most cases.

You can use long or short options. An equal sign between option name and option value is optional.

esxcli --server <vc_hostname_or_IP> --username <privileged_user> --password <password> --vihost <esxi_hostname_or_IP> <namespace> [<namespace]...> <command> --<option_name=option_value>

Some options, such as --help, have no value.

Important: Enclose passwords and other text with special characters in quotation marks.

When running commands on Windows, use double quotes (" "). When running commands on Linux, use single quotes (' ') or a backslash (\) as an escape character.

The following examples connect to the server as user snow-white with password dwarf$.

Linux

esxcli --server <vc_hostname_or_IP> --username snow\-white --password dwarf\$ network ip interface list
esxcli --server <vc_hostname_or_IP> --username snow\-white --password 'dwarf$' network ip interface list

Windows

esxcli --server <vc_hostname_or_IP> --username "snow-white" --password "dwarf$" network ip interface list