重置客户端 DNS 地址:-ResetServerAddresses

获取当前客户端 DNS 地址

当前有线网络接口的 InterfaceIndex 为 3;

Get-DnsClientServerAddress

InterfaceAlias               Interface Address ServerAddresses
                             Index     Family
--------------               --------- ------- ---------------
以太网                               3 IPv4    {114.114.114.114}
以太网                               3 IPv6    {}
WLAN 2                              21 IPv4    {}
WLAN 2                              21 IPv6    {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3}
本地连接* 1                         33 IPv4    {}
本地连接* 1                         33 IPv6    {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3}
本地连接* 10                        38 IPv4    {}
本地连接* 10                        38 IPv6    {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3}
蓝牙网络连接 2                      18 IPv4    {}
蓝牙网络连接 2                      18 IPv6    {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3}
Loopback Pseudo-Interface 1          1 IPv4    {}
Loopback Pseudo-Interface 1          1 IPv6    {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3

重置当前客户端 DNS 地址

Set-DnsClientServerAddress -InterfaceIndex 3 -ResetServerAddresses

确认重置 DNS 结果状态

获取重置后有线网络接口 InterfaceIndex 为 3 的 DNS 已经恢复为系统默认!

Get-DnsClientServerAddress

InterfaceAlias               Interface Address ServerAddresses
                             Index     Family
--------------               --------- ------- ---------------
以太网                               3 IPv4    {10.0.20.1, 10.0.20.2}
以太网                               3 IPv6    {}
WLAN 2                              21 IPv4    {}
WLAN 2                              21 IPv6    {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3}
本地连接* 1                         33 IPv4    {}
本地连接* 1                         33 IPv6    {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3}
本地连接* 10                        38 IPv4    {}
本地连接* 10                        38 IPv6    {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3}
蓝牙网络连接 2                      18 IPv4    {}
蓝牙网络连接 2                      18 IPv6    {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3}
Loopback Pseudo-Interface 1          1 IPv4    {}
Loopback Pseudo-Interface 1          1 IPv6    {fec0:0:0:ffff::1, fec0:0:0:ffff::2, fec0:0:0:ffff::3}

0 条评论

昵称

沙发空缺中,还不快抢~