Windows2003 to bulk Add and export all IP BAT scripts _dos/bat

Source: Internet
Author: User

Bulk Add IP

Run under the cmd command line:

Copy Code code as follows:

For/l%i in (130,1,190) does netsh interface ip add address "Local Area Connection" 192.168.1.%i 255.255.255.192

Add all IP for "192.168.1.130~192.168.1.190" to "Local Area Connection" and the subnet mask is 255.255.255.192

Export all IP

Write a batch of bat files, following the contents, running

Copy Code code as follows:

@echo off

for/f%%i in (' WMIC computersystem get name^|findstr/i/V ' name ') do set Name=%%i&echo compute computer name%%i >%%i.txt
For/f "delims=: Tokens=2″%%j in (' ipconfig^|findstr/i IP address ') do echo computer IP for%%j >>%name%.txt
The Echo task is processed by any key display
Pause&start%name%.txt

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.