Building Windows Server with Puppet and Chocolatey
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 "192.168.51.29" –PrefixLength 24 -DefaultGateway 192.168.51.8
2
3$ Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 192.168.50.20, 192.168.50.21Install Chocolatey:
1$ set-executionpolicy unrestricted<br />
2$ iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))Restart PowerShell
Install VMware tools
1$ choco install vmware-toolsRename server
1$ rename-computer -newname newservernameReboot
1restart-computer1add-computer -domain benpiper.com1restart-computer1choco install puppet1Configure c:\programdata\puppetlabs\puppet\etc\puppet.conf1puppet_interactive1puppet cert sign newservernameRun Puppet agent
1puppet_interactive1puppet resource dism
2puppet resource package