`
zhanggenzhong
  • 浏览: 25093 次
  • 性别: Icon_minigender_1
  • 来自: 上海
社区版块
存档分类
最新评论

如何用脚本快速修改IP地址(Netsh)

阅读更多

如果通过Windows的网络属性修改Ip/网关,真是太麻烦了。
最近一个项目经常要切换ip,所以我写了两个脚本:
c:\116.bat
netsh interface ip set address "本地连接" static 10.45.128.116 255.255.255.0 10.45.128.254 1

c:\172.bat
netsh interface ip set address "本地连接" static 172.17.9.222 255.255.255.0 172.17.9.51 1

这样就可以设置IP/Mask/GateWay了,netsh命令真方便!

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics