After you have set up the credential store with users and passwords, you can use the credentials.

The following examples show how you can use the credential store.

  • In your own Perl scripts, you can retrieve passwords or other information as needed by using the library subroutine.
  • When you run an existing vSphere SDK for Perl script, you can specify the host and user name either from the command line or in an environment variable. When that host and user name has an entry with a valid password in the credential store, the script is run.
  • If you run a script that includes a host name but no user, and if the credential store contains exactly one entry for that host, the script takes the user from that credential store entry and not prompt for a user.
  • When you call an existing vSphere SDK for Perl script, and you specify only the host name, the authentication mechanism prompts for a user name. If no entry exists for that user, the authentication mechanism also prompts for a password.