Day 52: Bootstrapping the Chef Client onto a Windows Host

In last week’s post, Bootstrapping the Chef Client onto a Linux Host, we demonstrated how to deploy the Chef Client onto Ubuntu 12.04. This week, we’ll be demonstrating the same process on a Windows Server 2012 R2 Host.

Before we begin, please note that the example below will work for a Domain Joined Server; however, it requires the use of a local account with Administrative Rights on the Server. Additionally, the example below is with a Windows Server 2012 R2 Host that is a fresh installation with no additional configurations other than the defaults. Use the example as more of a guide if you plan on using this example to work on an existing host in your environment.


Update your Chef-Workstation running Ubuntu 12.04

Run the following commands to update your Chef Workstation’s Ruby version to 1.9.1.


Next,  run the following command to install the knife-windows plugin.



Install the Chef Client on a Windows Server 2012 R2 Host

Next, run the following WinRM commands on your Windows Host; this is how Windows Nodes communicate with the Chef Environment.

Note that some of the configurations above would not be suited for most Production Environments; however, for testing purposes they will suffice.

Next, make sure that if your Windows Firewall is turned on, to create an exception to allow for Windows WinRM (HTTP) Inbound Traffic for any host on port 5985.

Finally, run the following command below from the Chef Workstation in order to bootstrap the Windows Host. (Remember, you need to run the bootstrap command from within the chef-repo directory on your workstation as that is where the knife command is currently configured!)


Once the Chef Client has been installed, you can login to your Chef Server, and view the added Host under the Status section.



Just as was demonstrated for an Ubuntu Host, from your Chef Workstation, you can also verify that the client installation was successful by running one of the following three command(s):

The output from each of these commands should include the Windows Host that you just added the Chef Client to.



This week’s post has demonstrated how to install the Chef Client on a Windows Host and verify that it is able to communicate with your Chef Server. In next weeks post, we’ll start delving into configuring our Chef Clients.


Previous Installments

100 Days of DevOps with PowerShell






One thought on “Day 52: Bootstrapping the Chef Client onto a Windows Host

  1. Pingback: Bootstrapping a Windows Node in Chef 12 | DevOps, Automation & Monitoring

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.