Remothly change IP's configuration with Netsh command

O

Omar

Under technet I found a text named configurin Windows 2000
networking components release on November 2001, this doc
speaks about the netsh command and on the end of the text
it have a subtitle named Remote configuration here says
that there is a way to change the ip configuration of a
worstation or server remotly, I try to follow this but
is't works the sintaxis that I'm using is:

netsh -r 10.113.3.0 int ip set add "Local Area Connection"
static 10.113.2.115 255.255.252.0 10.113.0.1 2

I try on this machine and other with the DHCP
configuration enabled and doesn't work too.

This is a very interesting tool because I can change all
my network to a static IP network or to a DHCP so I whant
to know if this is still posible with netsh command.

Thanks for your help and support.

Have a nice day.
 
G

Gary Fose [MSFT]

Hi Omar,

Here is the correct script:

To change to a static address, type the following command


"netsh interface ip set address "Local Area Connection" static
<ipaddr>?<subnetmask>?<gateway>?<metric>" (without the quotation marks)

NOTE: Replace <ipaddr> with the static IP address, <subnetmask> with the subnet mask,
<gateway> with the default gateway and, if necessary, <metric> with the appropriate metric.
The following example changes the interface "Local Area Connection" to a static address of
192.168.0.10 with a subnet mask of 255.255.255.0, and the interface has a default gateway of
192.168.0.1 with a metric of 1


"netsh interface ip set address "Local Area Connection" static
192.168.0.10 255.255.255.0 192.168.0.1 1" (without the quotation marks)

Thanks,
Gary

--------------------
'--'Content-Class: urn:content-classes:message
'--'From: "Omar" <[email protected]>
'--'Sender: "Omar" <[email protected]>
'--'Subject: Remothly change IP's configuration with Netsh command
'--'Date: Fri, 9 Apr 2004 14:42:53 -0700
'--'Lines: 23
'--'Message-ID: <[email protected]>
'--'MIME-Version: 1.0
'--'Content-Type: text/plain;
'--' charset="iso-8859-1"
'--'Content-Transfer-Encoding: 7bit
'--'X-Newsreader: Microsoft CDO for Windows 2000
'--'X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
'--'Thread-Index: AcQee5yrIpPjk6ORQ1yFRFrTHUxLlg==
'--'Newsgroups: microsoft.public.win2000.networking
'--'Path: cpmsftngxa06.phx.gbl
'--'Xref: cpmsftngxa06.phx.gbl microsoft.public.win2000.networking:60482
'--'NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
'--'X-Tomcat-NG: microsoft.public.win2000.networking
'--'
'--'Under technet I found a text named configurin Windows 2000
'--'networking components release on November 2001, this doc
'--'speaks about the netsh command and on the end of the text
'--'it have a subtitle named Remote configuration here says
'--'that there is a way to change the ip configuration of a
'--'worstation or server remotly, I try to follow this but
'--'is't works the sintaxis that I'm using is:
'--'
'--'netsh -r 10.113.3.0 int ip set add "Local Area Connection"
'--'static 10.113.2.115 255.255.252.0 10.113.0.1 2
'--'
'--'I try on this machine and other with the DHCP
'--'configuration enabled and doesn't work too.
'--'
'--'This is a very interesting tool because I can change all
'--'my network to a static IP network or to a DHCP so I whant
'--'to know if this is still posible with netsh command.
'--'
'--'Thanks for your help and support.
'--'
'--'Have a nice day.
'--'
'--'
'--'


This posting is provided "AS IS" with no warranties, and confers no rights. Use of included
script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this message are best
directed to the newsgroup/thread from which they originated.
 
O

Omar

Thanks Gary I use this localy and there is no problem, the
issue is the NETSH command it have the option to remotly
connect to any other computer the command is: netsh , then
under the netsh console I type: set machine <PC name>
then I get the prompt [PC name] netsh> here is where I
suppost can change the IP or any network configuration I
whant because if I use under the remote machine the
changes are applied to the remote computer not the local
one.

thanks for your help and support.
-----Original Message-----
Hi Omar,

Here is the correct script:

To change to a static address, type the following command:


"netsh interface ip set address "Local Area Connection" static
<ipaddr>?<subnetmask>?<gateway>?<metric>" (without the quotation marks)

NOTE: Replace <ipaddr> with the static IP address,
<gateway> with the default gateway and, if necessary,
The following example changes the interface "Local Area
Connection" to a static address of
192.168.0.10 with a subnet mask of 255.255.255.0, and the
interface has a default gateway of
192.168.0.1 with a metric of 1:


"netsh interface ip set address "Local Area Connection" static
192.168.0.10 255.255.255.0 192.168.0.1 1" (without the quotation marks)

Thanks,
Gary

--------------------
'--'Content-Class: urn:content-classes:message
'--'From: "Omar" <[email protected]>
'--'Sender: "Omar" <[email protected]>
'--'Subject: Remothly change IP's configuration with Netsh command
'--'Date: Fri, 9 Apr 2004 14:42:53 -0700
'--'Lines: 23
'--'Message-ID: <[email protected]>
'--'MIME-Version: 1.0
'--'Content-Type: text/plain;
'--' charset="iso-8859-1"
'--'Content-Transfer-Encoding: 7bit
'--'X-Newsreader: Microsoft CDO for Windows 2000
'--'X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
'--'Thread-Index: AcQee5yrIpPjk6ORQ1yFRFrTHUxLlg==
'--'Newsgroups: microsoft.public.win2000.networking
'--'Path: cpmsftngxa06.phx.gbl
'--'Xref: cpmsftngxa06.phx.gbl microsoft.public.win2000.networking:60482
'--'NNTP-Posting-Host: tk2msftngxa13.phx.gbl 10.40.1.165
'--'X-Tomcat-NG: microsoft.public.win2000.networking
'--'
'--'Under technet I found a text named configurin Windows 2000
'--'networking components release on November 2001, this doc
'--'speaks about the netsh command and on the end of the text
'--'it have a subtitle named Remote configuration here says
'--'that there is a way to change the ip configuration of a
'--'worstation or server remotly, I try to follow this but
'--'is't works the sintaxis that I'm using is:
'--'
'--'netsh -r 10.113.3.0 int ip set add "Local Area Connection"
'--'static 10.113.2.115 255.255.252.0 10.113.0.1 2
'--'
'--'I try on this machine and other with the DHCP
'--'configuration enabled and doesn't work too.
'--'
'--'This is a very interesting tool because I can change all
'--'my network to a static IP network or to a DHCP so I whant
'--'to know if this is still posible with netsh command.
'--'
'--'Thanks for your help and support.
'--'
'--'Have a nice day.
'--'
'--'
'--'


This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included
script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all
responses to this message are best
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top