View Full Version : netsh and 'Interface Names'


graeme_smith77@hotmail.com
09-21-2006, 11:40 AM
Hi all,

I need to change the Subnet Mask on a number of servers (some 2000,
some 2003 and even a few virtuals) and was wondering about doing this
via a batch script using NETSH.

Since these have been installed by various people over the years they
probably have a variety of Interface Names.
As the command line requires the Interface name I'm wondering if there
is a smart way around this.

What I'd really like to be able to do with a batch file is have a list
of netsh lines that change the Subnet mask on the Interface in use and
repond back that it was successful but I don't know if this is
feasable??

I may end up just having to change them manually?

Regards

Graeme

Pegasus \(MVP\)
09-21-2006, 01:43 PM
<graeme_smith77@hotmail.com> wrote in message
news:1158835224.160986.288610@m7g2000cwm.googlegroups.com...
> Hi all,
>
> I need to change the Subnet Mask on a number of servers (some 2000,
> some 2003 and even a few virtuals) and was wondering about doing this
> via a batch script using NETSH.
>
> Since these have been installed by various people over the years they
> probably have a variety of Interface Names.
> As the command line requires the Interface name I'm wondering if there
> is a smart way around this.
>
> What I'd really like to be able to do with a batch file is have a list
> of netsh lines that change the Subnet mask on the Interface in use and
> repond back that it was successful but I don't know if this is
> feasable??
>
> I may end up just having to change them manually?
>
> Regards
>
> Graeme
>

If your servers have a single network adapter then it should
be sufficient to use this syntax:
netsh interface ip set address local static 192.168.44.111 255.255.255.0
192.168.44.254 1

graeme_smith77@hotmail.com
09-21-2006, 03:52 PM
Many thanks. I'll test this out.
Regards

Graeme
>
> If your servers have a single network adapter then it should
> be sufficient to use this syntax:
> netsh interface ip set address local static 192.168.44.111 255.255.255.0
> 192.168.44.254 1