beautypg.com

Authenticating by using vcem, User-name and password logon, Logging on without a password – HP Virtual Connect Enterprise Manager Software User Manual

Page 11

background image

echo Add network connection complete - Update network connections --------------------------
for /L %%I in (1,1,%MAXPROFILES%) DO (
echo Assigning enet connection %NEWNET% to port 3 of PROFILE-%%I
%CLI% -set enet-connection -profilename PROFILE-%%I -network %NEWNET% -portnumber 3
if ERRORLEVEL 1 goto ERRORHANDLER
)

echo Assign the profiles to bays that have servers present ---------------------------------
for /L %%I in (1,1,%MAXPROFILES%) DO (
::Turn off the server in the target bay ONLY if a server is present
%CLI% -show power-status -enclosureName %ENCLNAME% -bayname %%I
if ERRORLEVEL 240 (
echo There is no server in bay %%I - skipping profile assignment
) else (
if ERRORLEVEL 1 (
echo ------------------------------------------
echo Turning off server in bay %%I
%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 by using VCEM

The VCEMCLI allows two types of authentication:

Systems Insight Manager certificate based (administrators only): If the VCEMCLI user is logged
on as the local administrator, no credentials are required for command execution. This is the
recommended authentication method.

User-name and password credential pair: If you are not logged on as an administrator, a
user-name and password credential pair must be provided. If only the password argument is
provided, the VCEMCLI uses the user name of the current Windows user for authentication.

User-name and password logon

Logging on requires a user-name and password credential set, which is passed to the VCEM server
for authentication. In this case, a successful logon is occurs when Systems Insight Manager validates
the supplied credentials. If the logon attempt is unsuccessful, an error message that indicates the
failure is reported.

User-name and password authentication is simple to configure, easier for testing scripts, and more
suited for use with role-based access control (RBAC). User-name 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 user-name and password so the information is available to the
script when it runs.

Logging on without a password

If you log on to the CMS as an administrator, it is possible to execute the 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.

Authenticating by using VCEM

11

This manual is related to the following products: