tisdag, maj 06, 2008

Windows 2003 Add several ip addresses at once

Create a batch file "servername-netsh-ipaddress-interface-WAN.cmd"

WAN in this case have been set via "Control Panel" -> "Network Connections" on appropriate Network adapter.


@echo on
netsh interface ip add address "WAN" 10.0.0.1 255.255.255.0
netsh interface ip add address "WAN" 10.0.0.2 255.255.255.0
pause


When run command promt will show status of commands, if "Ok" it works.