Version 2

    Script demostrates how to generate an ESXi HostSystem SSL thumbprint before adding the Host to vCenter.


    The script uses the Mime::Base64, Digest::SHA1, and Term::ReadKey modules.  The modules were selected as they are standard modules in most current Perl installations and will not require additional module installation to run the sample script.  The VMware VI Perl SDK is also required.



    Synopsis: OPTIONS
    Command-specific options:
       --cluster (required)
          Name of parent cluster for HostSystem (Required.)
       --esx_host (required)
          ESXi hostname (Required.  FQDN or IPAddress)
          ESXi console login password (Optional.  Prompt when unspecified.)
    Common VI options:
       --config (variable VI_CONFIG)
          Location of the VI Perl configuration file
       --credstore (variable VI_CREDSTORE)
          Name of the credential store file defaults to <HOME>/.vmware/credstore/vicredentials.xml on Linux and <APPDATA>/VMware/credstore/vicredentials.xml on Windows
       --encoding (variable VI_ENCODING, default 'utf8')
          Encoding: utf8, cp936 (Simplified Chinese), iso-8859-1 (German), shiftjis (Japanese)
          Display usage information for the script
       --passthroughauth (variable VI_PASSTHROUGHAUTH)
          Attempt to use pass-through authentication
       --passthroughauthpackage (variable VI_PASSTHROUGHAUTHPACKAGE, default 'Negotiate')
          Pass-through authentication negotiation package
       --password (variable VI_PASSWORD)
       --portnumber (variable VI_PORTNUMBER)
          Port used to connect to server
       --protocol (variable VI_PROTOCOL, default 'https')
          Protocol used to connect to server
       --savesessionfile (variable VI_SAVESESSIONFILE)
          File to save session ID/cookie to utilize
       --server (variable VI_SERVER, default 'localhost')
          VI server to connect to. Required if url is not present
       --servicepath (variable VI_SERVICEPATH, default '/sdk/webService')
          Service path used to connect to server
       --sessionfile (variable VI_SESSIONFILE)
          File containing session ID/cookie to utilize
       --url (variable VI_URL)
          VI SDK URL to connect to. Required if server is not present
       --username (variable VI_USERNAME)
       --verbose (variable VI_VERBOSE)
          Display additional debugging information
          Display version information for the script




    $ perl --server= --username=administrator@vlab  --esx_user=root --esx_host= --cluster=CLU01

    Enter password:

    Enter password for ESXi root console account:

    Adding HostSystem '' to Cluster 'CLU01'...