脚本快速设置windowsIP地址

Ethan
文章目录

提前修改脚本版

echo offclstitle 设置IPrncecho 正在设置IP地址,请稍候……
set "network=172.16.1"
set /p ip=输入主机地址然后回车:

netsh interface ip set address "Ethernet" static %network%.%ip% 255.255.255.0 %network%.1 1

echo 正在更改DNS设置,请稍候……

netsh interface ip set dns "Ethernet" static 8.8.8.8 primary 

netsh interface ip add dns name = "Ethernet" addr=114.114.114.114

echo ******修改完成!******pause

手动设置网段及主机版本

echo offclstitle 设置IPrncecho 正在设置IP地址,请稍候……
set /p network=输入网络地址然后回车:
set /p ip=输入主机地址然后回车:

netsh interface ip set address "Ethernet" static %network%.%ip% 255.255.255.0 %network%.1 1

echo 正在更改DNS设置,请稍候……

netsh interface ip set dns "Ethernet" static 8.8.8.8 primary 

netsh interface ip add dns name = "Ethernet" addr=114.114.114.114

echo ******修改完成!******pause

手动设置网段、网关、主机地址及DNS版本,在第二个版本基础上修改一下即可

Ethan
本文作者

本文链接:https://blog.htlac.com/archives/597.html

版权声明:本站文章采用 CC BY-NC-SA 4.0 协议,转载请注明出处。

暂无评论

(评论关闭)