You can create a session file with the save_session script.
The save_session script is in the /apps/session directory of the vSphere SDK for Perl, which is included in the vCLI package. You can use the session file, which does not reveal password information, when you run vCLI commands. If the session file is not used for 30 minutes, it expires.
If you use a session file, other connection options are ignored.