脚本设置ip&自动获取ip

设置ip

netsh interface ip set address "本地连接 2" static 192.168.1.110 255.255.255.0 192.168.1.1 1
netsh interface ip add dns name="本地连接 2" addr=172.168.0.28

自动获取

netsh interface ip set dns name = "本地连接 2" static addr = none 
netsh interface ip set address name="本地连接 2" source=dhcp  

参考文献:http://blog.csdn.net/wuweilong/article/details/9841095

posted on 2015-02-08 11:50  巴顿的博客  阅读(480)  评论(0编辑  收藏  举报

导航