Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How to Change a Computer's Domain Name System Server from the Command Line


View products that this article applies to.

Summary

This article describes how to change a computer's Domain Name System (DNS) server or servers from the command line, either locally or remotely. This operation requires you to use the Regfind.exe tool from either the Microsoft Windows NT Server Resource Kit or the Microsoft Windows 2000 Server Resource Kit.

↑ Back to the top


More information

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows

To change a computer's Domain Name System (DNS) server or servers from the command line, type: regfind -p HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\parameters "old DNS value" -r "new DNS value(s)"

Where old DNS value is the value the server currently has, and new DNS value(s) is the new value you want to use. The format is dotted decimal notation.

You can also perform the same operation to a computer remotely by typing the following command: regfind -m \\computer name -p HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\parameters "old DNS value" -r "new DNS value(s)"

Where computer name is the NetBIOS name or the Internet Protocol (IP) address of the remote computer.

Note You do not have to restart the computer for the DNS changes to take effect.

For more information about the Regfind tool and its capabilities, at a command prompt, type: regfind /?

↑ Back to the top


Keywords: KB290396, kbhowto, kbdns

↑ Back to the top

Article Info
Article ID : 290396
Revision : 7
Created on : 2/28/2007
Published on : 2/28/2007
Exists online : False
Views : 519