Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

July 27, 2004 12:00 AM

Change DNS IP Address

Windows IT Pro
InstantDoc ID #43042
Rating: (10)

Administering systems that run DNS server­dependent applications can be challenging if the DNS server is unavailable. For DNS-dependent applications to run, you usually need to switch name resolution services to another DNS server. To change a local or remote DNS client computer's DNS server, you can use the Microsoft Windows 2000 Server Resource Kit's Regfind utility.

First, open a new command window or telnet to the remote computer. Run ipconfig /all to obtain a list of configured DNS servers (save the output to a file if necessary). To change the DNS server, go to the command line and enter

regfind -p HKEY_LOCAL_
MACHINE\SYSTEM\Current
ControlSet\Services\Tcpip\parameters 
<old DNS IP address> -r <new DNS IP address>

Rerun ipconfig /all to verify that the new DNS IP address is validated. Optionally, run ipconfig /flushdns to flush the DNS resolver cache. You don't need to reboot the computer.

If you need to configure the system with multiple DNS servers, simply add the second server after the first server. For example, entering

regfind -p HKEY_LOCAL_
MACHINE\SYSTEM\Current
ControlSet\Services\Tcpip\parameters 
10.11.12.13 -r 10.11.12.14 10.11.12.15

adds a second server. To change the DNS server's IP address on a remote computer, enter

regfind -m \\<Computer_Name> -p HKEY_LOCAL_MACHINESYSTEM\CurrentControlSetServices\Tcpip\parameters 
<old DNS IP address> -r <new DNS IP address>

Related Content:

ARTICLE TOOLS

Comments
  • Ryan
    4 months ago
    Oct 25, 2011

    Seems like an outdated method. Here is an easier way to do it using PsExec and Netsh:
    http://itswapshop.com/content/how-set-or-change-ip-addresses-gateways-subnet-masks-and-dns-servers-remotely-windows

  • Anonymous User
    7 years ago
    Jun 22, 2005

    It seems to be appending, rather than replacing, so my DNS string is getting longer and longer.

  • OMAR
    8 years ago
    Dec 14, 2004

    we shutdown all our server and in other site they use our DNS server so we change the DNS IP of all this machines with this simple but powerfull command.

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.