我有兩個批次文件,一個用於將 DNS 更改為 Unblock-US,另一個用於將其重置為 DHCP。這些在 Windows 7 和 8/8.1 中完美運行,但升級到 Windows 10 後我無法再將其重設為 DHCP。
解鎖美國批次:
netsh interface ipv4 set dns "Ethernet 2" static 208.122.23.22
netsh interface ipv4 add dns "Ethernet 2" 208.122.23.23 index=2
ipconfig /flushdns
DHCP 批次:
netsh interface ipv4 set dns "Ethernet 2" static dhcp
netsh interface ipv4 add dns "Ethernet 2" dhcp index=1
ipconfig /flushdns
任何人都知道可能出了什麼問題?
答案1
改變這個:
netsh interface ipv4 set dns "Ethernet 2" static dhcp
到
netsh interface ipv4 set dns "Ethernet 2" dhcp
請記住以管理員權限執行此操作,第二行是多餘的。