6.5

Table Of Contents
Overview of Running vCLI Host Management Commands
You can run vCLI commands interactively or in scripts, and you can target the host directly or target a
vCenter Server system that manages the host.
Targeting the Host Directly
You can target the host directly from an administration server on which you installed vCLI, by using vMA,
or by running scripts.
n
Open a command prompt on a Linux or Windows system on which you installed vCLI. Enter
commands into that command prompt, specifying connection options. See Authenticating Directly to
the Host,” on page 34.
n
Access the vMA Linux console. Set up target servers and run vCLI commands against the targets
without additional authentication.
n
Prepare scripts that contain vCLI commands. Then run the scripts from a system that has the vCLI
package installed or from the vMA Linux console. See “Using vCLI Commands in Scripts,” on page 42.
N Dierent command sets in the vCLI package require dierent connection options.
When you run commands against an ESXi host, you must be authenticated for that host.
Targeting a Host That is Managed by a vCenter Server System
When you target a host that is managed by a vCenter Server system, you can run commands in dierent
ways.
n
Specify the vCenter Single Sign-On service with the --psc option and, if multiple vCenter Server
systems are associated with the vCenter Single Sign-On service, the vCenter Server system with the
--server option. Specify also the host with the --vihost option.
n
Specify the vCenter Server system with the --server option and the ESXi host with the --vihost
option.
n
Specify only the ESXi host with the --vihost option.
When you can authenticate to a vCenter Single Sign-On service or to a vCenter Server system, you can target
all ESXi hosts that vCenter Server manages without additional authentication. See Authenticating Through
vCenter Server and vCenter Single Sign-On,” on page 34.
Protecting Passwords
You can follow dierent password protection approaches depending on your environment setup.
C If you specify passwords in plain text, you risk exposing the password to other users. The
password might also become exposed in backup les. Do not provide plain-text passwords on production
systems.
Follow one of the following approaches for protecting passwords.
n
If you use a vCLI host management command interactively and do not specify a user name and
password, you are prompted for them. The screen does not echo the password that you enter.
n
For noninteractive use, you can create a session le using the save_session option. See “Create and Use
a Session File,” on page 34.
Getting Started with vSphere Command-Line Interfaces
32 VMware, Inc.