Install Keyfactor Command on Windows Under IIS from the Command Line
The Keyfactor Command server can optionally be configured using a pair of configuration files and a command run from the command line. You may be provided one or both of these files by your Keyfactor Customer Success Manager. The configuration files for command-line configuration are:
-
Keyfactor Command Configuration File
This file, with an extension of .cmscfg, contains information in XML format to configure the Keyfactor Command database. This file can be generated by installing Keyfactor Command, running the configuration wizard and populating all the fields as desired, and then saving a copy of the configuration either with or without a password to encrypt sensitive information in the file (see Install Keyfactor Command on a Windows Server Under IIS). Keyfactor highly recommends using a strong password to protect the file. A file that has not been protected with a password will be missing the sensitive information that would be protected by the password encryption (for example, service account passwords).
-
Input Parameters File
This file, with an extension of .xml, contains information in XML format to connect to and configure SQL, open the Keyfactor Command configuration file, locate the Keyfactor Command license, and create application pools, if desired.
Install Keyfactor Command
You can install Keyfactor Command interactively using the installation wizard or non-interactively from a command shell or PowerShell session.
To install interactively, follow the instructions for Install Keyfactor Command on a Windows Server Under IIS except on the final installation wizard page, uncheck the Launch the Configuration Wizard now box and click Finish. The configuration wizard should not open.
Install Default Features from the Command Line
To install default features from a Command Prompt, in an administrative command prompt run:
start /wait msiexec /i <PATH_TO_INSTALL_FILE>\KeyfactorPlatform.msi /Live <PATH_FOR_OUTPUT_LOGS> /Quiet
To install default features from PowerShell, in an administrative PowerShell run:
Start-Process msiexec.exe -Wait -ArgumentList '/i', `
'<PATH_TO_INSTALL_FILE>\KeyfactorPlatform.msi', `
'/Live', '<PATH_FOR_OUTPUT_LOGS>', `
'/Quiet'
These commands perform a non-interactive installation (/Quiet), write installation logs to the specified location (/Live), and wait for the installation to complete before returning control to the shell.
Install Specific Features from the Command Line
To install only specific features, use the ADDLOCAL parameter
A parameter or argument is a value that is passed into a function in an application. and provide a comma-separated list of feature names.
For example, the following command installs only the Orchestrator Services API and Windows Services features in a Command Prompt:
start /wait msiexec /i <PATH_TO_INSTALL_FILE>\KeyfactorPlatform.msi ADDLOCAL=AgentServicesFeature,ServiceFeature /Live <PATH_FOR_OUTPUT_LOGS> /Quiet
The following command installs all features in a PowerShell:
Start-Process msiexec.exe -Wait -ArgumentList '/i', `
'<PATH_TO_INSTALL_FILE>\KeyfactorPlatform.msi', `
'ADDLOCAL=AgentServicesFeature,CAConnectorAPIFeature,CommandBFFFeature,ConfigurationFeature,LogiFeature,ServiceFeature,VCRedistFeature,WebApiFeature,WebConsoleFeature', `
'/Live', '<PATH_FOR_OUTPUT_LOGS>', `
'/Quiet'
The features you install depend on the architecture of your Keyfactor Command deployment. Features can be installed together on a single server or distributed across multiple servers. Install the features required for the capabilities you plan to use and for the function each server performs within the deployment.
The following features are available:
-
AgentServicesFeature
Installs the Orchestrator Services API feature. Required only if you plan to use agents or orchestrators.
-
CAConnectorAPIFeature
Installs the CA Connector API feature. Not installed by default.
-
CommandBFFFeature
Installs the Command BFF feature.
-
ConfigurationFeature
Installs the Keyfactor Command Configuration Wizard. Required for all installations.
-
LogiFeature
Installs the Logi feature, which provides the legacy dashboards and reporting platform.
-
ServiceFeature
Installs the Windows Services feature, including the Keyfactor Command Service (timer service).
-
VCRedistFeature
Installs the Microsoft Visual C++ Redistributable. Required unless a supported version is already installed.
-
WebApiFeature
Installs the Web API feature, which hosts the Keyfactor API
An API is a set of functions to allow creation of applications. Keyfactor offers the Keyfactor API, which allows third-party software to integrate with the advanced certificate enrollment and management features of Keyfactor Command.. -
WebConsoleFeature
Installs the Management Portal feature, which hosts the Keyfactor Command web interface and includes the Keyfactor API.
Configure Keyfactor Command
To configure Keyfactor Command from the command line, you must provide two configuration files:
-
A Keyfactor Command configuration file.
The Keyfactor Command configuration file can be obtained from your Keyfactor Customer Success Manager or generated by installing and configuring Keyfactor Command on a test system. This file is not intended to be created manually, although most settings can be edited after the file has been generated. Password-protected fields cannot be edited manually.
-
An input parameters file.
Create an input parameters file as described in Table 95: Input Parameters XML File Fields. A sample file can be found in the Configuration directory under the Keyfactor Command installation directory. By default, this file is located at:
C:\Program Files\Keyfactor\Keyfactor Platform\Configuration\InputParameters.xml
After preparing both files, open an administrative Command Prompt and change to the Configuration directory under the Keyfactor Command installation directory (by default, C:\Program Files\Keyfactor\Keyfactor Platform\Configuration). Then run the ConfigurationWizardConsole tool, specifying your input parameters file and any required command-line options. SeeTable 96: ConfigurationWizardConsole.exe Options for details. For example:
.\ConfigurationWizardConsole.exe -p C:\Temp\InputParameters.xml -u
Table 95: Input Parameters XML File Fields
| Parameter | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
AppliationPoolsToCreate
|
An array of application pools to create. A separate application pool is required for each virtual directory that will be created for Keyfactor Command in IIS. If you choose to install all the features, this will be application pools for the virtual directories with the following names, by default:
Application pool fields include:
For example: Copy
|
||||||||||
|
ConfigurationFile
|
The full path to the Keyfactor Command configuration file (for example, C:\Temp\myconfig.cmscfg). | ||||||||||
|
ContinueOnSqlGrantError
|
A Boolean indicating whether the configuration should continue if an error is encountered when attempting to set SQL permissions. | ||||||||||
|
CreateDatabaseIfMissing
|
A Boolean indicating whether the SQL database should be created if it does not exist (True or False). If this is set to False and a database does not exist, an error will be generated and the configuration will not continue. | ||||||||||
|
Database
|
The name of the database in SQL for Keyfactor Command. If a database with this name exists, it will be used (see ForceDatabaseConversion). If it doesn't, it will be created (see CreateDatabaseIfMissing). | ||||||||||
|
DatabaseServer
|
The host name or IP address of the SQL server where the Keyfactor Command database will be installed, with optional port. For example:
|
||||||||||
|
ForceDatabaseConversion
|
A Boolean indicating whether a pre-existing SQL database should be converted for use by Keyfactor Command (True or False). If this is set to False and a pre-existing database that has not already been converted for Keyfactor Command use is found, an error will be generated and the configuration will not continue. | ||||||||||
|
ForceDatabaseUpgrade
|
A Boolean indicating whether a pre-existing SQL database should be upgraded from a previous version of Keyfactor Command (True or False). If this is set to False and a pre-existing database that is running a version of Keyfactor Command that does not match the version being installed is found, an error will be generated and the configuration will not continue. | ||||||||||
|
LicenseFile
|
The full path to your Keyfactor Command license file (for example, C:\Temp\keyexample.cmslicense). | ||||||||||
|
Password
|
A string containing the password used to protect the Keyfactor Command configuration file if Protected is set to True. | ||||||||||
|
Protected
|
A Boolean indicating whether sensitive information in the Keyfactor Command configuration file is protected with a password (True or False). | ||||||||||
|
SqlPassword
|
A string containing the SQL password to be used to authenticate to the SQL server. Leave this field blank if you are using Windows integrated authentication. | ||||||||||
|
SqlUsername
|
A string containing the SQL username to be used to authenticate to the SQL server if you have opted to use SQL authentication. For an on-premises SQL server, the server must be configured to support mixed mode authentication to use the SQL option. This option can be used to connect to cloud-based (for example, Azure) SQL servers. Leave this field blank if you are using Windows integrated authentication. The credentials of the logged on user executing the command will be used to authenticate to SQL. |
Table 96: ConfigurationWizardConsole.exe Options
| Switch | Description |
|---|---|
| -p, --paramfile | The full path to the input parameters XML file. This switch is required. |
| -u, --unattended | Do not output errors at the console. Errors will be redirected to the Windows event log. |
| -d, --database | Create the database in SQL but do not configure Keyfactor Command. |
| -s, --scriptpath |
The full path to a non-standard location for the scripts used during a database upgrade. By default, these are found in the following path: C:\Program Files\Keyfactor\Keyfactor Platform \Configuration\DatabaseUpgrade
This option is typically only used by Keyfactor Support. |
| --help | Display the help. |
| --version | Display the version information. |
Was this page helpful? Provide Feedback