As the weather gets colder, a lot of small partners are starting to get lazy and want to complete the task in the quickest way.
Let us introduce the method of Windows bulk Add and remove IP
(1) Batch Add IP
Run the bottom command directly below the CMD.
For/l%i in (2,1,254) do netsh interface ip add address "Local Area Connection" 192.168.1.%i 255.255.255.0
For/l%i in (2,1,62) do netsh interface ip add address "Local Area Connection" 192.168.2.%i 255.255.255.192
Some small partner pit will ask if there is another segment of the IP how to operate?
Here you can change the contents of this script to achieve the effect of the modification.
For/l%i in (2,1,254) do netsh interface ip add address " Local Area Connection" 192.168.1.%i 255.255.255.0
Bold can be modified, according to their own needs, modify the corresponding parameters to achieve their own needs.
(2) Bulk Delete IP
Bulk delete the ip[bound to the network card, please enter the following operation in the case of the bundled NIC IP
CMD, enter the following command
First step: netsh-c int IP Dump >c:\ip.txt
In the C packing directory see a ip.txt file, which is the information of the NIC in use.
Step Two:
Edit this file and delete the IP you want to delete in IP.TXT.
Step Three:
Netsh-f C:\ip.txt
Re-import the IP information of the NIC information to the NIC.
Need to restart server
Windows bulk Add and remove IP