In some point of time (I don't know when...) the DNS on a Windows 2003 Server gets populated with all computers on Active Directory.

There is any way to repopulate it again? For instance, when changing the IP on a computer how to do to update DNS records? When dropping a computer, how to drop it from DNS Server?

Of course, a way is to do it by hand, but there is an automated way (say command line or menu option)?

EDIT: Robert Moir, Things I wish to do:

  • Cleanup DNS entries for old computer that does not exists (dead computers or/and active directory dropped).
  • Some computer have fixed (not DHCP) IP addresses (in our case we have computer on another building and for network provider reasons the DHCP is not working there fine, all buildings connect with VPNs). If we move a DHCP computer to another LAN wich requires fixed IP how can DNS get updated not by hand?

6 Answers 6


This should happen automatically (for windows machines on your domain as long as 'register this connection's address in dns' is checked under dns tab). If you change the IP manually or if it receives a new IP via DHCP this should be automatic. You can delete them all from DNS and they will eventually all show back up.

As mentioned, ipconfig /registerdns will force registration, but your comment that it doesn't work "for a dropped and died computer" is confusing. If the machine is off the network or powered off then there is no way for it to register its address. Please provide more information if possible.


Active Directory information is not used to populate DNS because they are two different things doing two different jobs, even when DNS data is held inside AD.

To simply tidy up old DNS entries, you probably ought to look at this and also the comments others have made about getting DHCP updating DNS records too.

OK DHCP and the network system on Windows clients should update those as their IP address changes. If this isn't happening then check the settings on the DHCP server. You can force this to pass along changes to the DNS server itself if clients are not doing so.

If this isn't happening for devices with static addresses that you're already changing manually then ipconfig /registerDNS will do it, as already suggested. I know you said you didn't want a manual solution but if someone's already sitting there manually updating the ip address then for this one purpose it might well be easier to make an exception.

aging and scavenging of records on the DNS server should ensure that "crud" gets cleaned out eventually.

I don't think there's going to be one answer where you just tick one box on the server and all of this happens automagically without a hitch, because you're really talking about a few different things here.

  • I answered on the question (I hope!)
    – FerranB
    Commented Jun 18, 2009 at 23:05
  • edited answer from old format (which asked for clarification of question)
    – Rob Moir
    Commented Jun 18, 2009 at 23:27

IPCONFIG /registerdns

will "try" to register the A and PTR records of the machine you are running this command on in the DNS servers the NIC is associated with.

  • For an droped and died computer does not work..
    – FerranB
    Commented Jun 18, 2009 at 21:46

The Microsoft DHCP server has an option to update DNS records when DHCP leases change. That is probably what you are looking for.


nltest /dsregdns run from a DC will tell that DC to register it's records. /dsderegdns will tell the DC to unregister it's records. If the DC is dead, you can't run "nltest" so there does not seem to be a utility to clean the dead DC's records out of DNS...

A DC's records are a lot more than what is registered with ipconfig /registerdns. A DC registers numerous service location records (SRV records) such as records with names starting with _ldap and _kerberos.


I got the following message in the event log after I had to delete and recreate the DNS zone (emphasis mine):

Dynamic registration or deletion of one or more DNS records associated with DNS domain 'example.com.' failed. These records are used by other computers to locate this server as a domain controller (if the specified domain is an Active Directory domain) or as an LDAP server (if the specified domain is an application partition).

Possible causes of failure include:
- TCP/IP properties of the network connections of this computer contain wrong IP address(es) of the preferred and alternate DNS servers
- Specified preferred and alternate DNS servers are not running
- DNS server(s) primary for the records to be registered is not running
- Preferred or alternate DNS servers are configured with wrong root hints
- Parent DNS zone contains incorrect delegation to the child zone authoritative for the DNS records that failed registration

Fix possible misconfiguration(s) specified above and initiate registration or deletion of the DNS records by running 'nltest.exe /dsregdns' from the command prompt on the domain controller or by restarting Net Logon service on the domain controller.

I already tried the nltest.exe /dsregdns suggested in another answer here, but that didn't work for me.

However, after restarting the Netlogon service all Active Directory related DNS entries were back. I only had to recreate static machine entries manually.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .