Fixed bugs introduced by previous commit

This commit is contained in:
Milos Curcic 2020-06-17 16:08:57 +02:00
Родитель 073d35c7d5
Коммит 7b6b0d5be7
1 изменённых файлов: 8 добавлений и 9 удалений

Просмотреть файл

@ -159,10 +159,10 @@ function PrintLocalNetworkConfiguration() {
$properties = $networkInterface.GetIPProperties()
Write-Output ' Interface name: ' $networkInterface.Name
Write-Output ' Interface description: ' $networkInterface.Description
Write-Output ' Interface type: ' $networkInterface.NetworkInterfaceType
Write-Output ' Operational status: ' $networkInterface.OperationalStatus
Write-Output ' Interface name: ' + $networkInterface.Name
Write-Output ' Interface description: ' + $networkInterface.Description
Write-Output ' Interface type: ' + $networkInterface.NetworkInterfaceType
Write-Output ' Operational status: ' + $networkInterface.OperationalStatus
Write-Output ' Unicast address list:'
Write-Output $(' ' + [String]::Join([Environment]::NewLine + ' ', [System.Linq.Enumerable]::Select($properties.UnicastAddresses, [Func[System.Net.NetworkInformation.UnicastIPAddressInformation, IPAddress]] { $args[0].Address })))
@ -176,16 +176,16 @@ function PrintLocalNetworkConfiguration() {
function PrintDNSResults($dnsResult, [string] $dnsSource) {
if ($dnsResult) {
Write-Output ' Found DNS record in' $dnsSource '(IP Address:'$dnsResult.IPAddress')'
Write-Output ' Found DNS record in' + $dnsSource + '(IP Address:' + $dnsResult.IPAddress + ')'
}
else {
Write-Output ' Could not find DNS record in' $dnsSource
Write-Output ' Could not find DNS record in' + $dnsSource
}
}
function ValidateDNS([String] $Server) {
Try {
Write-Output 'Validating DNS record for' $Server
Write-Output 'Validating DNS record for' + $Server
$DNSfromHosts = Resolve-DnsName -Name $Server -CacheOnly -ErrorAction SilentlyContinue
PrintDNSResults $DNSfromHosts 'hosts file'
@ -292,6 +292,5 @@ try {
[TDSClient.TDS.Utilities.LoggingUtilities]::ClearVerboseLog()
}
} catch {
} finally {
Write-Output $_.Exception.Message
}