Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use script to modify network configuration under windows

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

@ echo off

Set / p input= input

Set hostip=%input%

Netsh interface ip set address "WLAN" static 192.168.2% hostip% 255.255.255.0 192.168.2.1 1

Netsh interface ip set dns "WLAN" static 202.96.128.86 primary

Netsh interface ip add dns "WLAN" 202.96.128.86

Description

Set / p input= input

Enter the ip of one host bit

Set hostip=%input%

Variable hostip assignment, referencing input

Netsh interface ip set address "WLAN" static 192.168.2% hostip% 255.255.255.0 192.168.2.1 1

Set ip address, subnet mask, gateway, hop count

Name of "WLAN" network card

% hostip% reference variable

Netsh interface ip set dns "WLAN" static 202.96.128.86 primary

Set up the primary dns

Netsh interface ip add dns "WLAN" 202.96.128.86

Increase standby dns

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 302

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report