diff --git a/Fix-UpdateLocalHosts.ps1 b/Fix-UpdateLocalHosts.ps1 index b5f011f..6534b48 100644 --- a/Fix-UpdateLocalHosts.ps1 +++ b/Fix-UpdateLocalHosts.ps1 @@ -4,11 +4,13 @@ $DNSHelperRequiredVersion = '2.2.0' $DownloadRequired = $false If (Test-Path $DNSHelper) { - $versionOutput = (& $DNSHelper | Select-Object -First 1) + $versionOutput = (& $DNSHelper 2>&1 | Select-Object -First 1) If ($versionOutput -match 'v(\d+\.\d+\.\d+)') { If ($Matches[1] -ne $DNSHelperRequiredVersion) { $DownloadRequired = $true } + } Else { + $DownloadRequired = $true } } Else { $DownloadRequired = $true