Skip to content

Commit

Permalink
Check for correct EWS InternalNLBBypassUrl on BE
Browse files Browse the repository at this point in the history
  • Loading branch information
dpaulson45 committed Jan 18, 2024
1 parent ed84e0a commit 034214c
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ function Invoke-AnalyzerExchangeInformation {
$hardwareInformation = $HealthServerObject.HardwareInformation
$getWebServicesVirtualDirectory = $exchangeInformation.VirtualDirectories.GetWebServicesVirtualDirectory |
Where-Object { $_.Name -eq "EWS (Default Web Site)" }
$getWebServicesVirtualDirectoryBE = $exchangeInformation.VirtualDirectories.GetWebServicesVirtualDirectory |
Where-Object { $_.Name -eq "EWS (Exchange Back End)" }

$baseParams = @{
AnalyzedInformation = $AnalyzeResults
Expand Down Expand Up @@ -307,6 +309,23 @@ function Invoke-AnalyzerExchangeInformation {
Add-AnalyzedResultInformation @params
}

if ($null -ne $getWebServicesVirtualDirectoryBE -and
$null -ne $getWebServicesVirtualDirectoryBE.InternalNLBBypassUrl) {
Write-Verbose "Checking EWS Internal NLB Bypass URL for the BE"
$expectedValue = "https://$($exchangeInformation.GetExchangeServer.Fqdn.ToString()):444/ews/exchange.asmx"

if ($getWebServicesVirtualDirectoryBE.InternalNLBBypassUrl.ToString() -ne $expectedValue) {
$params = $baseParams + @{
Name = "EWS Internal Bypass URL Incorrectly Set on BE"
Details = "Error: '$expectedValue' is the expected value for this." +
"`r`n`t`tAnything other than the expected value, will result in connectivity issues."
DisplayWriteType = "Red"
}

Add-AnalyzedResultInformation @params
}
}

Write-Verbose "Working on results from Test-ServiceHealth"
$servicesNotRunning = $exchangeInformation.ExchangeServicesNotRunning

Expand Down

0 comments on commit 034214c

Please sign in to comment.