Specifying Options

You can specify the common options in several ways, discussed in this section.
When you run a vSphere CLI command, authentication happens in the following order of precedence.
vSphere CLI Authentication Precedence
Authentication
Description
See
Targeting
and Using vCenter Single Sign-On
If you are working in an environment that is managed by vCenter Single Sign-On, you can specify the vCenter Single Sign-On server and a user name, password, and target host.
Command line
Password (
--password
), session file (
--sessionfile
), or configuration file (
--config
) specified on the command line.
Configuration file
Passwords specified in a
.visdkrc
configuration file.
Environment variable
Password specified in an environment variable.
Credential store
Password retrieved from the credential store.
Current account (Active Directory)
Current account information used to establish an SSPI connection. Windows only.
Prompt the user for a password.
 
 
This order of precedence always applies. That means, for example, that you cannot override an environment variable setting in a configuration file.