Install Windows agents using msiexec from the command line
You can install the .msi
package manually from the
command line if you need to customize puppet.conf
, CSR attributes, or
certain agent properties.
If you Install agents with the install script
(with PowerShell), you can Customize the install script by specifying CSR attribute settings and
some MSI properties. The msiexec
command does not
require PowerShell and allows you to specify more MSI
properties.
- Identify the MSI properties you want to include in the
msiexec
command and prepare the syntax for those properties. - If you need to set CSR attributes, create a
csr_attributes.yaml
file in the Puppetconfdir
(atC:\ProgramData\PuppetLabs\puppet\etc\csr_attributes.yaml
) prior to installing the Puppet agent package.Customize the install script explains how to specify CSR attribute settings.
- To log installation progress to an
install.txt
log file, include/l*v install.txt
in yourmsiexec
command. - On the command line of the node where you want to install the agent, run your
msiexec
command.The basic command is:
msiexec /qn /norestart /i <PACKAGE_NAME>.msi
Your command likely includes additional arguments, such as
/l*v
,PUPPET_AGENT_CERTNAME
, or any other valid MSI properties. For example, thismsiexec
command installs the agent with a primary server located atpuppet.acme.com
:msiexec /qn /norestart /i <PACKAGE_NAME>.msi PUPPET_SERVER=puppet.acme.com
This
msiexec
command installs the agent to a domain user account calledbob
on theExampleCorp
domain with the account password ofpassword
:msiexec /qn /norestart /i <PACKAGE_NAME>.msi PUPPET_AGENT_ACCOUNT_DOMAIN=ExampleCorp PUPPET_AGENT_ACCOUNT_USER=bob PUPPET_AGENT_ACCOUNT_PASSWORD=password
- Run
puppet agent -t
to add the node to the node inventory and generate the CSR. - Accept the CSR as explained in Managing certificate signing requests.