Building Windows Server with Puppet and Chocolatey

Share on:

Forget using scripts and group policies to configure a new Windows Server machine. Using Chocolatey and Puppet, you can do it faster & easier than ever (and it’s more fun too). This is especially true if you’re using a Server Core installation and don’t have a GUI to help you along. Oh, and if you don’t know Puppet, you really should watch my course Puppet Fundamentals for System Administrators on Pluralsight 🙂

Assign IP address using PowerShell:

1$ New-NetIPAddress InterfaceAlias "Ethernet" IPAddress "" PrefixLength 24 -DefaultGateway
3$ Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses,

Install Chocolatey:

1$ set-executionpolicy unrestricted<br />
2$ iex ((new-object net.webclient).DownloadString(''))

Restart PowerShell

Install VMware tools

1$ choco install vmware-tools
The server will automatically restart.

Rename server

1$ rename-computer -newname newservername


Join to domain
1add-computer -domain
Reboot again
Install Puppet
1choco install puppet
Configure Puppet
1Configure c:\programdata\puppetlabs\puppet\etc\puppet.conf
Generate puppet certificate
Sign puppet certificate on puppet master
1puppet cert sign newservername
Apply appropriate profiles to server. Remember to restart the Puppet master if you change your Hiera configuration.

Run Puppet agent

1puppet resource dism
2puppet resource package