批处理设置本地连接 DNS

180it 2021-11-18 PM 1778℃ 0条
@echo off

SC config Dnscache start= demand
SC start Dnscache
netsh interface ipv4 set dns "本地连接" static 114.114.114.114 primary
netsh interface ip add dns "本地连接"   223.5.5.5 2

netsh interface ipv4 set dns "以太网" static 114.114.114.114 primary
netsh interface ip add dns "以太网"   223.5.5.5 2

netsh interface ipv4 set dns "WLAN" static 114.114.114.114 primary
netsh interface ip add dns "WLAN"   223.5.5.5 2

ipconfig /flushdns

netsh interface ip show dns
ping www.180it.com
pause
支付宝打赏支付宝打赏 微信打赏微信打赏

如果文章或资源对您有帮助,欢迎打赏作者。一路走来,感谢有您!

标签: none

批处理设置本地连接 DNS