Does anyone know how to script the addition of static ip address (as in the
advanced tcp/ip settings tab of the tcp/ip properties)? I can only find
examples for adding a single static ip, netmask, gateway...

Thanks,

Rich

Re: Script to add additional static ip addresses to machine by Marty

Marty
Fri Jul 22 12:00:21 CDT 2005


It's been a long time since I've done this, but I remember doing this with an
array of strings. So if you use the example listed here:
http://www.microsoft.com/technet/scriptcenter/scripts/network/client/modify/nwmovb01.mspx

It would look something like this:
strIPAddress = Array("192.168.1.141", "192.168.2.100")
strSubnetMask = Array("255.255.255.0", "255.255.255.0")


SDK:
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/enablestatic_method_in_class_win32_networkadapterconfiguration.asp



"Rich Rekos" <RichRekos@discussions.microsoft.com> wrote in message
news:8B3E4C3E-DA14-4486-ABF0-923605A06EA8@microsoft.com...
> Does anyone know how to script the addition of static ip address (as in the
> advanced tcp/ip settings tab of the tcp/ip properties)? I can only find
> examples for adding a single static ip, netmask, gateway...
>
> Thanks,
>
> Rich