At my work, we have two connection specific DNS suffixes. lhs.local and cis.local. I'm trying to write a batch file that will take care of a lot of the common administrative tasks that need done when we deploy a computer, and appending these is one of those tasks.

Is there a command to do this programatically?

link|improve this question

50% accept rate
1  
Why are you (ab?)using Zeroconf TLDs? – Ignacio Vazquez-Abrams Oct 11 '10 at 15:28
Please don't get me started, lol. Why am I the one who pioneered our imaging initiative when I'm just tier 2 support? – Chris Sobolewski Oct 11 '10 at 16:03
feedback

1 Answer

up vote 1 down vote accepted

Via this post

In order to add a DNS suffix to a TCP/IP connection remotely, all you need is a list of IP addresses and the following command:

wmic /USER:administrator /PASSWORD:adminpassword /node:@c:\iplist.txt nicconfig call SetDNSSuffixSearchOrder (mydomain.com)

where C:\iplist.txt contains a list of IP addresses, line separated.

Another way is to add via the registry

reg add HKLM\System\currentcontrolset\services\tcpip\parameters /v “NV Domain” /d “mydomain.com” /f

There's a Microsoft KB entry for the same as well.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.