Our environment has approximately 15 Domain Controllers that also provide DHCP functionality to their networks. We have discovered several to have incorrect DNS settings. Their are providing incorrect DNS servers for the secondary DNS. Recently we had to bring the main DNS server down for maintenance, so now PCs at some locations cannot resolve addresses correctly.
Is their a way to set DHCP via GPO?
To clarify I do not want to set the client settings. I want to set the DHCP Scope Options on the servers via GPO. So that way they provide correct DNS Servers when they issue leases.
Best Answer
You can deploy batch script over GPO to DHCP servers that will change DNS settings in DHCP scope using netsh utility.
A command to set DNS servers in scope with netsh is:
If 10.10.10.1 is primary DNS, and 10.10.10.2 is secondary DNS, and 10.10.10.0 is DHCP scope, you would basically just need to run the following command on every DHCP server:
Netsh commands for DHCP, TechNet article
Using netsh, TechNet article