Thursday, December 15, 2011

script o add multiple a bunch of IP addresses to a network connection without having to type each one in individually

script o add multiple a bunch of IP addresses to a network connection without having to type each one in individually

Create a batch file like the below:

Add IP
netsh in ip add address "Local Area Connection" 10.0.0.2 255.0.0.0

Delete IP
netsh in ip delete address "Local Area Connection" 10.0.0.2

or just do a command like



for /L %a in (1,1,254) do netsh in ip add address "Local Area Connection" 10.0.0.%a 255.255.255.0

No comments: