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.

  1. Identify the MSI properties you want to include in the msiexec command and prepare the syntax for those properties.
  2. If you need to set CSR attributes, create a csr_attributes.yaml file in the Puppetconfdir (at C:\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.

  3. To log installation progress to an install.txt log file, include /l*v install.txt in your msiexec command.
  4. 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, this msiexec command installs the agent with a primary server located at puppet.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 called bob on the ExampleCorp domain with the account password of password:

    msiexec /qn /norestart /i <PACKAGE_NAME>.msi PUPPET_AGENT_ACCOUNT_DOMAIN=ExampleCorp PUPPET_AGENT_ACCOUNT_USER=bob PUPPET_AGENT_ACCOUNT_PASSWORD=password

  5. Run puppet agent -t to add the node to the node inventory and generate the CSR.
  6. Accept the CSR as explained in Managing certificate signing requests.