windows使用netsh设置静态&动态ip的脚本

使用netsh设置静态ip地址及动态ip地址具体脚本如下,感兴趣的朋友可以参考下,希望对你有所帮助

使用netsh设置静态ip地址:

复制代码
代码如下:

@echo off
netsh interface ip set address "本地连接" static 172.24.83.239 255.255.255.0 172.24.83.247
netsh interface ip set dns "本地连接" 172.24.102.110
netsh interface ip add dns "本地连接" 172.24.102.110 index=2
pause

使用netsh设置动态ip地址:

复制代码
代码如下:

@echo off
netsh interface ip set address name="本地连接" source=dhcp
netsh interface ip set dns name="本地连接" source=dhcp
pause

以上就是windows使用netsh设置静态&动态ip的脚本的详细内容,更多请关注0133技术站其它相关文章!

赞(0) 打赏
未经允许不得转载:0133技术站首页 » windows