Re: Changing Primary and Secondary DNS servers in IP Properties

Tech-Archive recommends: Speed Up your PC by fixing your registry



Mikey wrote:
Thanks Ken and KJ.

This is very helpful information. I played with the netsh command
and was able to change the primary DNS and add a secondary DNS.
There was one catch, however. You have to supply the Connection
Name. This varies from server to server. netsh interface ip set dns
name= does not seem to support wild card characters. Is there
another way to change all the connections or perhaps capture the
names in a VB script and then send it back to the netsh command?


netsh interface ip show config

will give you the necessary info.

Scripting is also an option.

http://www.microsoft.com/technet/scriptcenter/topics/networking/05_atnc_dns.mspx


""Ken Zhao [MSFT]"" wrote:

Hello Mike,

Thank you for using newsgroup!

From your post, I agree with KJ. You can configure DNS server
settings for the DNS Client service from the command line. To
configure these settings for the local computer or a remote
computer, use the Netsh tool and the following command:

netsh interface ip set dns [name=]String [source=]dhcp|static
[addr=]IPAddress|none [[register=]none|primary|both]

The netsh interface ip set dns parameters are the following:

1. name is the name of the connection as it appears in the Network
Connections folder.
2. source is either dhcp, which sets DHCP as the source for
configuring DNS servers for the specific interface, or static, which
sets the source for configuring DNS servers to local static
configuration.
3. addr is either an IPv4 address for a DNS server or none, which
clears the list of DNS servers.
4. For the register parameter, specify none, to disable DNS dynamic
update registration; primary, to register using the primary DNS
suffix only; both, to register using both the primary DNS suffix and
the connection-specific suffix.

Syntax
set dns
http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-
us/netsh_int_ip.mspx?mfr=true

Thanks & Regards,

Ken Zhao

Microsoft Online Support
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
<http://www.microsoft.com/security>
====================================================
When responding to posts, please "Reply to Group" via your
newsreader so that others may learn and benefit from your issue.
====================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.





--------------------
Thread-Topic: Changing Primary and Secondary DNS servers in IP
Properties thread-index: Acf1etvs+9/X6H4GS/axAzsc1VJwWQ==
X-WBNR-Posting-Host: 207.46.192.207
From: =?Utf-8?B?TWlrZXk=?= <Mikey@xxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Changing Primary and Secondary DNS servers in IP Properties
Date: Wed, 12 Sep 2007 13:24:02 -0700
Lines: 13
Message-ID: <2948EC12-5E84-4295-B437-9747E0A9ABE3@xxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2929
Newsgroups: microsoft.public.windows.server.migration
Path: TK2MSFTNGHUB02.phx.gbl
Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.server.migration:2078
NNTP-Posting-Host: tk2msftsbfm01.phx.gbl 10.40.244.148
X-Tomcat-NG: microsoft.public.windows.server.migration

Is there a way to script or GPO changing DNS primary and secondary
servers within the TCPIP properties on Win2000 and Win2003 servers?
All of our member servers are static IP and one of the pre-requites
to migrating computers to new domain is pointing their primary and
secondary DNS servers to the new DNS servers. I am aware of the
DNS Servers GPO, but that only applies to WinXP Pro. We currently
have hundreds of member servers that need to be migrated and it
would be quite a bummer to have to login to each one and change
them manually.

Oh, and while we're on the subject is there a way to do the same
thing with WINS?

Thanks much!!

--
/kj


.



Relevant Pages

  • Re: Windows 2000 logon process
    ... We are running Active Directory with integrated DNS. ... Having watched the open files again on both DNS servers at peak login time ... you have a DNS Server that is the Primary DNS ... > have some other DNS Servers that are functioning as Secondary DNS Servers ...
    (microsoft.public.win2000.active_directory)
  • Re: sys vol check
    ... instead of the local DNS server and two ISP DNS servers. ... I need to configure the DHCP to use all three internal DNS servers ... If DNS zones are AD Integrated are writtable. ...
    (microsoft.public.windows.server.active_directory)
  • Re: sys vol check
    ... You've 3 DC DNS servers one in each Site with different subnets. ... You've A forward lookup Zone named CORP.DLECINC.COM and a reverse lookup ... The clients should use only their local DNSserver in ther NIC ...
    (microsoft.public.windows.server.active_directory)
  • Re: Primary DNS problem
    ... Then stop/start your DNS server.. ... SBS v4.x: microsoft.public.backoffice.smallbiz SBS 2000: microsoft.public.backoffice.smallbiz2000 SBS 2003: microsoft.public.windows.server.sbs ... Still am curious though>> as to why the secondary DNS did not take over ... I checked and the forwarders are>>>setup with my ISP's Primary and Secondary DNS servers. ...
    (microsoft.public.windows.server.sbs)
  • Re: Win2k3 and Slow Logons
    ... > various DNS settings from the server and my router set up. ... for internal DNS servers, but it must NOT be listed on any ... >>>>bad world of the Internet. ...
    (microsoft.public.windows.server.dns)