Chef Infra Client Silent Install (How-To Guide)

The Chef Infra Client is an agent that runs locally on every node that is under management by Chef Infra. When the Chef Infra Client runs, it will bring the node into the expected state and prevent configuration drift. This article will serve as an informative guide and give you a clear understanding of how to perform a silent installation of the Chef Infra Client from the command line using the MSI installer.

How to Install the Chef Infra Client Silently

Chef Infra Client Silent Install (MSI)

  1. Navigate to: https://www.chef.io/downloads/tools/infra-client
  2. Select the version of your choice
  3. Download the chef-client-x.y.z-x64.msi to a folder created at (C:\Downloads)
  4. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  5. Navigate to the C:\Downloads folder
  6. Enter the following command:
MsiExec.exe /i chef-client-x.y.z-x64.msi ADDLOCAL="ChefClientFeature" /qn

After a few moments you will find Chef Infra Client entries in the Installation Directory and Programs and Features in the Control Panel.

Software Title: Chef Infra Client
Vendor: Chef Software, Inc.
Architecture: x64
Installer Type: MSI
Silent Install Switch: MsiExec.exe /i chef-client-x.y.z-x64.msi ADDLOCAL="ChefClientFeature" /qn
Silent Uninstall Switch: MsiExec.exe /x chef-client-x.y.z-x64.msi /qn
Repair Command: MsiExec.exe /fa chef-client-x.y.z-x64.msi /qn
Download Link: Chef Infra Client Download
PowerShell Script: Chef Infra Client | PowerShell Script
PSADT v4: Chef Infra Client | PSADT v4

The information above provides a quick overview of the software title, vendor, silent install, and silent uninstall switches. The download links provided take you directly to the vendors website. Continue reading if you are interested in additional details and configurations.


Additional Configurations

Create a Chef Infra Client Installation Log File

The Chef Infra Client installer offers the option to generate a log file during installation to assist with troubleshooting should any problems arise. You can use the following command to create a verbose log file with details about the installation.

Chef Infra Client Silent Install (MSI) with Logging

MsiExec.exe /i chef-client-x.y.z-x64.msi ADDLOCAL="ChefClientFeature" /qn /L*v "%WINDIR%\Temp\ChefInfraClientx64-Install.log"

Include the Chef PowerShell Module

This option will enable Chef command line utilities within PowerShell.

MsiExec.exe /i chef-client-x.y.z-x64.msi ADDLOCAL="ChefClientFeature,ChefPSModuleFeature" /qn

Configure Chef Infra Client as a Scheduled Task in Microsoft Windows

MsiExec.exe /i chef-client-x.y.z-x64.msi ADDLOCAL="ChefClientFeature,ChefSchTaskFeature" /qn

How to Uninstall the Chef Infra Client Silently

Check out the following posts for a scripted solution:

Chef Infra Client Install and Uninstall (PSADT v4)
Chef Infra Client Install and Uninstall (PowerShell)
  1. Open an Elevated Command Prompt by Right-Clicking on Command Prompt and select Run as Administrator
  2. Enter the following command:

Chef Infra Client Silent Uninstall (MSI)

MsiExec.exe /x chef-client-x.y.z-x64.msi /qn

Always make sure to test everything in a development environment prior to implementing anything into production. The information in this article is provided “As Is” without warranty of any kind.