netsh 命令行修改网络配置

netsh example

1
2
3
4
5
6
7
netsh
netsh>interface ip show config
netsh>netsh interface ip set address "connection name" static 192.168.x.x 255.255.255.0 192.168.x.x
netsh>netsh interface ip add dns "connection name" 8.8.8.8
netsh>netsh interface ip add dns "connection name" 114.114.114.114 index=2
netsh>netsh interface ip set address "connection name" dhcp
netsh>netsh interface ip set dns "connection name" dhcp