HP Virtual Connect Enterprise Manager 6.3 CLI Guide

%CLI% -poweroff devicebay -enclosureName %ENCLNAME% -bayname %%I -forceOnTimeout
if ERRORLEVEL 1 goto ERRORHANDLER
)
echo ------------------------------------------
echo The server in bay %%I is off. Assigning profile PROFILE-%%I
%CLI% -assign profile -profilename PROFILE-%%I -enclosureName %ENCLNAME% -bayname %%I
if ERRORLEVEL 1 goto ERRORHANDLER
)
)
goto END
:ERRORHANDLER
echo Error processing last command. ERRORLEVEL = %ERRORLEVEL%
:END
exit /b %ERRORLEVEL%
Authenticating with VCEM
VCEMCLI allows two types of authentication:
SIM certificate based (administrators only): If the vcemcli user is logged in as the local
administrator, then no credentials are required for command execution. This is the
recommended authentication method.
Username and password credential pair: If you are not logged in as an administrator, a
username and password credential pair must be provided. If only the password argument is
provided, VCEMCLI uses the username of the current Windows user for authentication.
Username and Password Logon
Logging on requires a username and password credential set which is passed to the VCEM server
for authentication. In this case, a successful logon is accomplished when the supplied credentials
are validated by Systems Insight Manager. If the logon attempt is unsuccessful, an error message
indicating the failure is reported.
Username and password authentication is simple to configure, easier for testing scripts, and more
suited for use with Role-based access control (RBAC). Username and password information must
be gathered at the time that the script is run, or you must define a sufficiently secure mechanism
in your environment to store the username and password so the information is available to the
script when it executes.
Logging on without a password
If you log on to the CMS as an administrator, it is possible to execute VCEMCLI without providing
credentials. This method uses a pre-installed authentication certificate available only to the CMS
administrator . HP recommends this method for executing the VCEMCLI because no password is
required as an argument on the command line.
Session Lifetime
VCEM CLI logon sessions remain active for a single command execution. The CLI automatically
logs out of the VCEM server after the execution completes, whether the command succeeded or
failed.
Role based Access Control (RBAC)
Role based access control allows you to designate which operations and resources can be
manipulated.
10 Using VCEMCLI