netsh修改IP及DNS

netsh interface ip show addresses  显示当前IP

netsh interface ip show dns           显示当前DNS

netsh interface ip set address name="本地连接" source=static addr=你的IP mask=你的掩码 gateway=你的网关 gwmetric=0

netsh interface ip set dns name="本地连接" source=static addr=你的DNS register=PRIMARY

原文地址:https://www.cnblogs.com/frostbelt/p/2057989.html