Networking
Showing results for 
Search instead for 
Do you mean 

Is it possible to add hosts file entries into AD/DNS?

SOLVED
Go to Solution
Honored Contributor

Is it possible to add hosts file entries into AD/DNS?


We have a W2K3 DC and we have other servers in the same domain with various local hosts files. Is there a way to add into AD/DNS all of the hosts file entries?

10 points to any answer.
Thank you
Gino
1 REPLY
Trusted Contributor

Re: Is it possible to add hosts file entries into AD/DNS?

try this one
Found it a few weeks ago.

You can use dnscmd tool from Windows Support tools. Here is a little script
to do it. I used it when I imported some DNS hosts from Windows host file of
a specific computer:

For /F "Tokens=1,* Delims= " %%A In (hosts.txt) Do (
Set ip=%%A
Set host=%%B
)

dnscmd dns_server_name /RecordAdd Forward_zone_name %host% A %ip%
//Add this to "OnDomLoad" event