Advance Tcp/Ip DNS entries

Greetings Professionals

Is there any cookbook available that updates and enters the IP's , advance TCP/IP and DNS settings for windows servers?

Below is the Screenshot for which we need to update the New ips and settings accordingly for more than windows 100+ nodes is there any way to get this done through chef?




Please help..!


There are no native chef resources for managing DNS settings, however chef can manage powershell commands

Here is an example of how you might set your dns servers (code untested and likely wont work as is).

powershell_script 'set dns' do
  code 'Set-DNSClientServerAddress –interfaceIndex 12 –ServerAddresses ("","")'
  not_if "Get-DNSClientServerAddress -interfaceIndex 12 -eq "" -and Get-DNSClientServerAddress -interfaceIndex 12  -eq ""
  action :run

Note the not_if attribute that prevents chef from overwriting the settings if they are already in the desired state.

We use the following cookbook for many of those settings on Windows - - it works well for our needs.