Windows bulk Add and remove IP

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.