InsightMedia
asked on
Script to add primary dns suffix
I want to write a script or batch file to add or change the primary dns suffix for WINXP and W2K machines. Using netsh I can force registration of the primary dns suffix, but I don't know how to change the suffix with out manually doing so. Any help would be greatly appreciated.
Any reason for not doing it through DHCP or even group policy?
Script example here: http://support.microsoft.com/?id=275553
ASKER
I want to modify the primary suffix. I don't care about the suffix search list & I don't want a connection-specific suffix. I inherited an NT4 domain (using WINS only) when I came here last August. I will be transitioning from NT domain to 2003 AD in early July. I am moving over 100 clients (around the state)from static addresses to DHCP, but DDNS will not properly register the client without adding the domain suffix manually (My computer -> properties -> Computer Name -> change -> more).
I know that when I move to active directory, the suffix will be changed automatically making the FQDN <hostname>.<primary dns suffix>, but I need DNS to work now.
I know that when I move to active directory, the suffix will be changed automatically making the FQDN <hostname>.<primary dns suffix>, but I need DNS to work now.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Set the Domain primary suffix using DHCP (using option 015 DNS domain name), then set the options in DHCP server to ALWAYS update DNS, and to update for clients that do not request updates.
Then DNS will be updated correctly with the A records and PTR records in the proper zones.
Then DNS will be updated correctly with the A records and PTR records in the proper zones.
HKLM\System\CurrentControl Set\Servic es\TCPIP\P arameters\ NV Domain <-- This is the registry key for the Primary DNS Setting...
ASKER
Cleaner...
I've already done this. All the DHCP machines show up in my reverse lookup zone but not the forward lookup zone. They only show up in the forward lookup zone after I manually set the Primary DNS suffix manually, then no problem.
NJ...This seemed to work on a couple of test machines. I'll whip up a script & push it out. Thanks!
I've already done this. All the DHCP machines show up in my reverse lookup zone but not the forward lookup zone. They only show up in the forward lookup zone after I manually set the Primary DNS suffix manually, then no problem.
NJ...This seemed to work on a couple of test machines. I'll whip up a script & push it out. Thanks!
np
hmm...strange. The option should work to set the DNS primary suffix, and setting the DHCP server to "Always update DNS records" should make the DHCP server update the DNS server with A and PTR records anytime it gives out a lease.
Regardless, NJ's script works as well.
Regardless, NJ's script works as well.