Link to home
Create AccountLog in
Avatar of Ludacina
Ludacina

asked on

Force DNS on clients

What is the best way to force DNS settings on clients. The main problem is that clients have manually  configured DNS server. I need to change that to automatic obtain DNS address or change  what is manually entered on 500 PCs.
SOLUTION
Avatar of Giladn
Giladn
Flag of Israel image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
you can set that with group policy

refer below link to create group policy

http://www.techrepublic.com/blog/datacenter/manage-dns-suffix-configuration-through-group-policy/2665
Avatar of Ludacina
Ludacina

ASKER

takecoffe,

can you tell me what is the right syntax for 2 dns servers(primary and secondary ) i tried this:

netsh interface ip set dns "Local Area Connection" static 192.168.1.5

and it works but if i say

netsh interface ip set dns "Local Area Connection" static 192.168.1.5 192.168.1.10

it says Element not found
You need to configure DHCP server to issue IP address and DNS. If you have static Ip configured you cannot update the DNS alone automatically. Best option configure DHCP server to issue IP address and DNS settings automatically and change the network settings in client to IP address obtain automatically
i ment Giladn up there

i tried his solution and it worked with static also but i need to have alternative dns too.
Jaihunt,

i know i need DHCP but right now i need static because i am migrating the DC that is DHCP and DNS so i need to have static, and after that i will go with netsh interface ip set dns "Local Area Connection" dhcp to give dns back to DHCP
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
To sum up


netsh dnsclient add dnsserver "Local Area Connection" 192.168.1.5 1
netsh dnsclient add dnsserver "Local Area Connection" 192.168.1.10 2


for Primary and Secundary DNS static

for DHCP

netsh interface ip set dns "Local Area Connection" dhcp