Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
windows:adding-ips-quickly [2010-06-18 21:45:57]
garrett.plasky
windows:adding-ips-quickly [2010-06-18 21:46:32]
garrett.plasky
Line 1: Line 1:
 ====== Adding IPs Quickly to a Windows Server ====== ====== Adding IPs Quickly to a Windows Server ======
-Adding a single IP to a windows server is simple enough but when you need to add say 16 IPs, the process can become tedious. Below is a command you can run from the command line to add IPs quickly to a Windows server (tested with 2003 and 2008). The command could easily be used in a batch script to add hundreds of IPs if necessary. The below command adds the IP address of 192.168.1.2 with the netmask of 255.255.255.0 to the "Local Area Connection" interface:+Adding a single IP to a windows server is simple enough but when you need to add say 16 IPs, the process can become tedious. Below is a command you can run from the command line to add IPs quickly to a Windows server((This has been tested and works in all versions of Windows Server 2000, 2003and 2008.)). The command could easily be used in a batch script to add hundreds of IPs if necessary. The below command adds the IP address of 192.168.1.2 with the netmask of 255.255.255.0 to the "Local Area Connection" interface:
  
 <code console>> netsh interface ip add address "Local Area Connection" 192.168.1.2 255.255.255.0</code> <code console>> netsh interface ip add address "Local Area Connection" 192.168.1.2 255.255.255.0</code>
Line 6: Line 6:
 If you wanted to add a range say from 192.168.1.2 through 192.168.1.254 you could do: If you wanted to add a range say from 192.168.1.2 through 192.168.1.254 you could do:
  
-<code console>> FOR /L %I IN (2,1,254) DO netsh interface ip add address "Local Area Connection" 192.168.1.%I 255.255.255.0</code>((This has been tested and works in all versions of Windows Server 2000, 2003, and 2008.))+<code console>> FOR /L %I IN (2,1,254) DO netsh interface ip add address "Local Area Connection" 192.168.1.%I 255.255.255.0</code>
  
  
 {{tag>how-to windows}} {{tag>how-to windows}}