Using a Configuration
FileLast Updated December 16, 2024
You can use a text
file that contains variable names and settings as a configuration file.
Variables corresponding to the
options are shown in
Connection Options for ESXCLI Host Management Command Execution.
Limit read
access to a configuration file that contains user credentials.
Pass in the configuration file when you run ESXCLI
commands, by using the following syntax.
The following example illustrates how you can use the
syntax.
If you have multiple
vCenter Server
or
ESXi
systems and you administer each system individually, you can
create multiple configuration files with different names. To run a command or a set of
commands on a server, you pass in the --config
option with the
appropriate file name at the command line. The following example illustrates the contents of a
configuration file.
If you have set up your system
to run this file, you can run scripts against the specified
ESXi
host
afterwards.