Users Guide

output certificate file: 将包含所有证书的文件的名称
create|append
create: 使脚本创建一个新的输出证书文件
append: 使脚本附加一个新的证书到输出证书文件。 在未指定该参数时,默认为 append
在服务器 IP 列表文件中指定唯一一个 IP 地址并指定创建选项后,您可使用该批处理文件导入一个来自 ESXi 服务器的证书。
Combinecerts.bat DOS 理文件
将以下文本复制到名为 combinecerts.bat 的文件。
------ START OF DOS Batch File -----
@echo off
rem Usage: combinecerts <user> <password> <servers ip list file> <output certificate file> [create|append]
rem (assuming same user and password for all servers)
rem option "create" causes the script to create a new <output certificate file>.
rem option "append" causes the script to append new certificates to the <output certificate file>.
if "%5"=="create" (del /F /Q %4 2>NUL)
for /f %%X in (%3) do (
echo.
echo.
echo Importing certificate from server: %%X
vifs.pl --server %%X --username %1 --password %2 --get /host/ssl_cert tmpcert.crt
if not errorlevel 1 (type tmpcert.crt >> %4)
del /F /Q tmpcert.crt 2>NUL