Skip to content
WJunction - Webmaster Forum

How to add multiple IPs with a Command line to windows server

Status
Not open for further replies.
How to add multiple IPs with a Command line to windows server

FOR /L %I IN (2,1,254) DO netsh interface ip add address "Public" 1.2.3.4-99I 255.255.255.0





FOR /L %I IN (10,1,20) DO netsh interface ip add address "Public" 67.22.135.%I 255.255.254.0

Above is the command with which you can add multiple IPs to the windows servers.

Now how to use it


the values that are in Brackets (10,1,20) , its the IP range that you are looking add for the host ID
So once you execute that command it will add the IPs from 1.2.3.10 to 1.2.3.20. The Value 1 should not
be changed.

Public is the interface where you are looking to add the IPs and the Subnet mask should be there e.g.255.255.254.0
 
Status
Not open for further replies.

About the author

N
Member · Joined
21
Messages
1
Reactions
3
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom