win11 bat脚本批量设置多个静态IP/DHCP

您所在的位置:网站首页 手动ip地址设置参数1034还有 win11 bat脚本批量设置多个静态IP/DHCP

win11 bat脚本批量设置多个静态IP/DHCP

2024-07-17 21:46| 来源: 网络整理| 查看: 265

@echo off netsh interface set interface name="以太网" admin=DISABLED netsh interface set interface name="以太网" admin=ENABLED netsh interface ip set address name="以太网" source=static address=192.168.168.168 mask=255.255.255.0

netsh interface ip add address name="以太网" 192.168.5.5  255.255.255.0

netsh interface ip add address name="以太网" 192.111.6.6  255.255.255.0 netsh interface ip add dnsserver name="以太网" address=114.114.114.114 pause

@echo off netsh interface set interface name="以太网" admin=DISABLED netsh interface set interface name="以太网" admin=ENABLED netsh interface ip set address name="以太网" source=dhcp pause

保存为.bat文件,以管理员权限运行;

注:保存文件使用ANSI格式;

win11手动设置:

设置 -> 网络和Internet -> 高级网络设置 -> 以太网 -> 更多适配器选项

 



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3