Hi Za Vue

Yes, netsh overwrites whatever is in the list at the time - either changing
it from dhcp to static, or changing the static.  You can also use :
      netsh interface ip set dns "local area connection" dhcp
to change it to dhcp - another trick we have thrown into startup scripts.
As for your second question - how do you get it to look at a list of pcs -
you would run a batch file that would read the list and send the netsh
command to the remote machines using a psexecute.  Or, if you were me you
would write a 300 line vbs script that would take two weeks to execute and
do exactly the same thing.

Regards;

James R. Day
Active Directory Core Team
Office of the Chief Information Officer
National Park Service
(202) 354-1464 (direct)
(202) 371-1549 (fax)
[EMAIL PROTECTED]


                                                                                       
                                                      
                      "Za Vue"                                                         
                                                      
                      <[EMAIL PROTECTED]>               To:       <[EMAIL PROTECTED]>  
                                              
                      Sent by:                       cc:       (bcc: James 
Day/Contractor/NPS)                                               
                      [EMAIL PROTECTED]        Subject:  RE: [ActiveDir] IP setting 
Script                                             
                      tivedir.org                                                      
                                                      
                                                                                       
                                                      
                                                                                       
                                                      
                      10/26/2004 09:13 AM AST                                          
                                                      
                      Please respond to                                                
                                                      
                      ActiveDir                                                        
                                                      
                                                                                       
                                                      





Does using Netsh clear the current static DNS settings?

Thanks,
Z.V

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 9:00 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [ActiveDir] IP setting Script

Hi Mahammed

You could use the netsh command - either in a startup script or login
script, or run it remotely using psexecute.

netsh interface ip set dns "local area connection" static 10.10.10.10 netsh
interface ip add dns "local area connection" static 10.10.10.11

We have used those commands in a startup script when we change DNS at
locations where they only have static addressing and it has worked well.
Normally we would have 10 lines in the script for local area connections 1
to 5 - just because a lot of the older machines have had multiple
replacement nics.  I am sure there is a way to make it apply to all active
connections but I have not spent any more time researching it.

http://www.microsoft.com/windowsxp/home/using/productdoc/en/default.asp?url=

/windowsxp/home/using/productdoc/en/netsh_int_ip.asp

Regards;

James R. Day
Active Directory Core Team
Office of the Chief Information Officer
National Park Service
(202) 354-1464 (direct)
(202) 371-1549 (fax)
[EMAIL PROTECTED]




                      MohammedAthif Khaleel

                      <mohammed.athifkhaleel@        To:
[EMAIL PROTECTED]

                      gmail.com>                     cc:       (bcc: James
Day/Contractor/NPS)
                      Sent by:                       Subject:  Re:
[ActiveDir] IP setting Script
                      [EMAIL PROTECTED]

                      tivedir.org





                      10/26/2004 03:40 PM ZE3

                      Please respond to

                      ActiveDir







Yes, DHCP should be pretty easy.

~Athif


On Tue, 26 Oct 2004 13:19:23 +0100, Robert Rutherford
<[EMAIL PROTECTED]> wrote:
> You can do this I'm sure... one of the script wizard will no doubt
> come back with a solution.
>
> I am just curious why you are using static IPs on your workstations?
> Is DHCP not a possibility?
>
> BR
>
> Rob
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Za Vue
> Sent: 26 October 2004 13:13
> To: [EMAIL PROTECTED]
> Subject: [ActiveDir] IP setting Script
>
> I need a script that I can run from a server to change the DNS
> settings on my workstations. I have been given a new subnet. My dns
> servers will need to be changed.
>
> Thank you,
> Z.V.
>
> List info   : http://www.activedir.org/mail_list.htm
> List FAQ    : http://www.activedir.org/list_faq.htm
> List archive:
> http://www.mail-archive.com/activedir%40mail.activedir.org/
>
> =======================================================================
>              Scanned for virus infection by Messagelabs
> ======================================================================
> =
>
>
>
>
> List info   : http://www.activedir.org/mail_list.htm
> List FAQ    : http://www.activedir.org/list_faq.htm
> List archive:
> http://www.mail-archive.com/activedir%40mail.activedir.org/
>


--
-------------------------------------
Mohammed.Athif Khaleel
-------------------------------------
List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/


List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/


List info   : http://www.activedir.org/mail_list.htm
List FAQ    : http://www.activedir.org/list_faq.htm
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to