fix: update DNS helper executable references and remove unused resolver logic

This commit is contained in:
2026-03-04 17:59:33 -05:00
parent 330501c551
commit a9ff804048
+6 -16
View File
@@ -1,6 +1,9 @@
$DNSHelperURL = 'https://www.emberkom.com/tools/dnshelper.exe'
$DNSHelper = $Global:ToolsDirectory + '\dnshelper.exe'
$DNSHelper = $Global:ToolsDirectory + '\ekdns.exe'
If ( !(Test-Path $DNSHelper) ) {
$DNSHelperURL = 'https://www.emberkom.com/tools/ekdns-x64.exe'
If !(Test-Path ${Env:ProgramFiles(x86)}) {
$DNSHelperURL = 'https://www.emberkom.com/tools/ekdns-x86.exe'
}
Download-File -URL $DNSHelperURL -File $DNSHelper
}
$RefreshScript = $Global:ToolsDirectory + '\refresh-local-hosts.bat'
@@ -13,13 +16,6 @@ REM Author: David Yoder, Emberkom LLC (Fix-UpdateLocalHosts.ps1)
REM Updated: ${todaysDate}`n
"@
$Resolvers = @(
'1.1.1.1',
'8.8.8.8',
'1.0.0.1',
'8.8.4.4'
)
$Hosts = @(
'auth.services.mspbackups.com',
'ws.mspbackups.com'
@@ -29,12 +25,6 @@ If ($BackupBucket.Length -ge 2 ) {
$Hosts += $BackupBucket
}
$ResolverString = ''
ForEach ($Resolver in $Resolvers) {
If ($ResolverString.Length -gt 0) { $ResolverString = $ResolverString + ',' + $Resolver }
Else { $ResolverString = $Resolver }
}
$HostString = ''
ForEach ($Hostname in $Hosts) {
If ($HostString.Length -gt 0) { $HostString = $HostString + ',' + $Hostname }
@@ -42,7 +32,7 @@ ForEach ($Hostname in $Hosts) {
}
If ( Test-Path $DNSHelper ) {
$commandString = """${DNSHelper}"" add -host ${HostString} -server ${ResolverString}"
$commandString = """${DNSHelper}"" add -host ${HostString}"
$content = $RefreshScriptHeader + $commandString
Write-Output "Creating latest refresh script"
If ( Test-Path $RefreshScript ) { Remove-Item -Path $RefreshScript -Force }