Atwill.Com

Bill Volz's Email Software Development Blog

NAVIGATION - SEARCH

Moving IP addresses from one Windows machine to another.

Here is a useful command for moving bulk IP's from one windows machine to another.

 

Export the ip's to a file.

c\>netsh interface ipv4 dump > c:\ipstomove.txt

then import the list to another machine.

c:\>netsh -f c:\ipstomove.txt

 

Things to note:  When exporting to the file it will export using the existing interface name.  If the new machine has a different interface name this will cause problems.  You can open the file in notepad and do a replace to correct this if needed.\

Additional Tip.  If you are adding a range of IPs you can use a loop.  The below command adds a C block of address or a /24 CIDR (255 ip addresses).  Again make sure you use the correct network adapter name.


FOR /L %I IN (2,1,254) DO netsh interface ip add address "Local Area Connection" 10.0.0.%I 255.255.255.0