Netsh IP address Switching Method 1: Example bat program: www.2cto.com echo # set static ip, default gateway netsh interface ip set address name = "Local Area Connection" static 192.168.0.123 255.255.255.0 192.168.0.1 0 echo # set preferred dns netsh interface ip set dns name = "Local Area connection "source = static addr = 168.95.1.1 register = PRIMARY echo # add dns name =" Local Area Connection "addr = 8.8.8.8 index = 2 echo on the device using the dns netsh interface ip address # Set wins to none netsh interface Ip set wins name = "Local Area Connection" source = static addr = none echo # The interface IP Address Configuration end content can be modified based on the actual situation. Www.2cto.com Method 2: netsh-c interface dump> c: \ netset.txt rem the current Nic configuration is generated as the file netsh-f c: \ netset.txt rem to apply the content in the configuration file to NIC settings.