Question : How to delete root hints and add new one programmatically in Windows 2003 DNS ?

I have hundreds of windwos 2003 domain controllers with AD-integrated DNS. I want to delete existing root hints and add new one programmatically. I sucessfully add my roothints with a DNSCMD command.

However I cannot delete the existing root hints (except using the DNS MMC GUI).

This VBScript this sample doesn't work http://techtasks.com/code/viewbookcode/1142.

My tries with DNSCMD command failed too (Example DNSCMD MyServerName /RecordDelete /RootHints myhints.domain NS gives "invalid zone type").

How can I achieve this ?

thank you

Answer : How to delete root hints and add new one programmatically in Windows 2003 DNS ?


You have to cope with how tenacious root hints are.

The copy in AD is loaded preferentially either from the DomainDNSZones application partition or from the domain partition (as above).

If the copy from AD fails to load "cache.dns" is loaded.

Only if both copies in AD, and cache.dns are deleted (or renamed), and only after the DNS service is restarted will any change become apparent.

Chris
Random Solutions  
 
programming4us programming4us