|
@ -11346,8 +11346,8 @@ function DNSoverHTTPS |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
# Set a primary and secondary DNS servers |
|
|
# Set a primary and secondary DNS servers |
|
|
Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq ""0.0.0.0"/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS |
|
|
Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0"} | Get-NetAdapter | Set-DnsClientServerAddress -ServerAddresses $PrimaryDNS, $SecondaryDNS |
|
|
$InterfaceGuid = (Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq ""0.0.0.0"/0"} | Get-NetAdapter).InterfaceGuid |
|
|
$InterfaceGuid = (Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0"} | Get-NetAdapter).InterfaceGuid |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# Set the DNS servers |
|
|
# Set the DNS servers |
|
@ -11377,7 +11377,7 @@ function DNSoverHTTPS |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
# Configure DNS servers automatically |
|
|
# Configure DNS servers automatically |
|
|
Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq ""0.0.0.0"/0"} | Get-NetAdapter | Set-DnsClientServerAddress -ResetServerAddresses |
|
|
Get-NetRoute | Where-Object -FilterScript {$_.DestinationPrefix -eq "0.0.0.0"} | Get-NetAdapter | Set-DnsClientServerAddress -ResetServerAddresses |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Remove-Item -Path "HKLM:\SYSTEM\ControlSet001\Services\Dnscache\InterfaceSpecificParameters\*" -Recurse -Force -ErrorAction Ignore |
|
|
Remove-Item -Path "HKLM:\SYSTEM\ControlSet001\Services\Dnscache\InterfaceSpecificParameters\*" -Recurse -Force -ErrorAction Ignore |
|
|