windows下使用脚本修改网络配置
2017-11-29 19:59
197 查看
@echo off
set /p 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
说明
set /p input=输入
输入一个主机位的ip
set hostip=%input%
变量hostip赋值,引用input
netsh interface ip set address "WLAN" static 192.168.2.%hostip% 255.255.255.0 192.168.2.1 1
设置ip地址、子网掩码、网关、跳跃数
"WLAN” 网卡名称
%hostip% 引用变量
netsh interface ip set dns "WLAN" static 202.96.128.86 primary
设置主dns
netsh interface ip add dns "WLAN" 202.96.128.86
增加备用dns
set /p 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
说明
set /p input=输入
输入一个主机位的ip
set hostip=%input%
变量hostip赋值,引用input
netsh interface ip set address "WLAN" static 192.168.2.%hostip% 255.255.255.0 192.168.2.1 1
设置ip地址、子网掩码、网关、跳跃数
"WLAN” 网卡名称
%hostip% 引用变量
netsh interface ip set dns "WLAN" static 202.96.128.86 primary
设置主dns
netsh interface ip add dns "WLAN" 202.96.128.86
增加备用dns
相关文章推荐
- windows 2008无线网络“没有正确配置为使用IP协议” 错误解决办法
- Windows脚本系列之三——使用脚本批量修改本地管理员密码
- windows_IP分配,windows7共享虚拟网络的脚本(自己使用)
- Windows 7配置VMware虚拟机使用无线网络
- Windows 7下OpenGL如何配置(网上有教程,这里做部分修改,也是为了方便自己以后使用)
- 快捷使用netsh导出、导入windows网络配置
- 使用命令行备份 Windows 7 无线网络配置
- Windows Azure Affinity Groups (3) 修改虚拟网络地缘组(Affinity Group)的配置
- SecureCRT使用VBS脚本自动备份网络设备配置,目前支持部分H3C及dptech
- Linux系统网络配置修改脚本
- Linux服务器 CentOS 6系列最小化安装优化脚本详解02————修改history记录、定时校正服务器时间、停止IPv6网络服务、调整最大文件打开数、关闭写磁盘I/O功能、配置SSH服务
- 使用Python脚本自动修改Windows的IP、网关和DNS设置
- 快捷使用netsh导出、导入windows网络配置
- Windows 64位系统下安装mysql,配置使用以及修改密码!
- windows 和linux 命令修改网络配置
- 14. 使用脚本创建Docker及配置网络
- windows 2008无线网络"没有正确配置为使用IP协议" 错误解决办法
- Windows网络配置脚本
- windows 2008初体验常见问题: 无线网络"没有正确配置为使用IP协议" 错误解决办法
- 在windows下使用PuTTy修改andriod下配置文件