Modify Client Side Primary/Secondary DNS Entries 
Author Message
 Modify Client Side Primary/Secondary DNS Entries

Quote:

> I need to script the modification of static DNS Server
> entries in the network adapters of several hundred NT
> 4.0/2000 Servers. Can someone lend some assistance?
> Thanks.

Do you have WMI installed on all your NT 4.0 servers (Win2k has it default
installed)?

If not, here are some other ways of doing it:

For Win2k, the resource kit utility NetSh.exe can be used (-r for remote it
looks like). See furher down for some help screen dumps. For NT 4.0, a registry
edit is possible I think:


Subject: Change addresses through script
Newsgroups: microsoft.public.win2000.cmdprompt.admin,
microsoft.public.win2000.networking, microsoft.public.win2000.registry
Date: 2002-01-02 01:46:00 PST
http://www.*-*-*.com/

To execute processes remotely, take a look at PsExec in the free PsTools suite
at http://www.*-*-*.com/

************************

C:\>NetSh /?

Usage: NetSh [-a AliasFile] [-c Context] [-r RemoteMachine]
             [Command | -f ScriptFile]

The following commands are available:

Commands in this context:
?              - Displays a list of commands.
add            - Adds a configuration entry to a list of entries.
delete         - Deletes a configuration entry from a list of entries.
dump           - Displays a configuration script.
exec           - Runs a script file.
help           - Displays a list of commands.
interface      - Changes to the `interface' context.
ras            - Changes to the `ras' context.
routing        - Changes to the `routing' context.
set            - Updates configuration settings.
show           - Displays information.

The following subcontexts are available:
 routing interface ras

To view help for a command, type the command, followed by a space, and then
 type ?.

**********************

C:\>NetSh interface ip set dns ?

Usage: set dns [name=]<string> [source=]dhcp|static [addr=]<IP address>|none

Parameters:

      Tag            Value
      name         - The name of the interface.
      source       - One of the following values:
                     dhcp: Sets DHCP as the source for configuring DNS
                           servers for the specific interface.
                     static: Sets the source for configuring DNS servers
                             to local static configuration.
      addr         - One of the following values:
                     <IP address>: An IP address for a DNS server.
                     none: Clears the list of DNS servers.

Remarks: Sets DNS server configuration to either DHCP or static mode. Only
         when source is 'static', is the 'addr' option also available for
         configuring a static list of DNS server IP addresses for the
         specified interface.

Examples:

       set dns name="Local Area Connection" source=dhcp
       set dns "Local Area Connection" static 10.0.0.1

**********************

C:\>NetSh interface ip add dns ?

Usage: add dns [name=]<string> [addr=]<IP address> [[index=]integer]

Parameters:

      Tag            Value
      name         - The name of the interface where DNS servers are added.
      addr         - The IP address for the DNS server you are adding.
      index        - Specifies the index (preference) for the specified
                     DNS server address.

Remarks: Adds statically a new DNS server IP address or re-indexes
         the ordered list of existing DNS server addresses to modify
         DNS server preference.

Examples:

       add dns "Local Area Connection" 10.0.0.1
       add dns "Local Area Connection" 10.0.0.3 index=2

--
torgeir



Fri, 28 Jan 2005 08:39:24 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Get Primary and Secondary DNS

2. Hoe to use 2 Primary Tables in a Primary/Secondary Data Form

3. 2 Primary Tables in a Primary/Secondary Data Form

4. Hoe to use 2 Primary Tables in a Primary/Secondary Data Form

5. Script to get the Primary and secondary WINS

6. Filling a Secondary Combobox based on information from a primary combobox

7. Primary key , Secondary Key ???????

8. VBS / LDAP Query for secondary email address entries.

9. Change Primary DNS suffix when domain membership changes

10. attached Contact Item on server-side becomes attached Mail Item on client-side

11. How Can I Pass Data Between the Server Side and the Client Side VB/JScript

12. Server side or client side cursors?

 

 
Powered by phpBB® Forum Software