Skip to content

Commit

Permalink
Merge pull request #2266 from Treamendous/Health-Checker-Fix-EOL-And-…
Browse files Browse the repository at this point in the history
…HotfixOutput

Health Checker Address End Of Life to include link and remove Installed on For SUs
  • Loading branch information
dpaulson45 authored Jan 16, 2025
2 parents 433ea1e + da9c9f5 commit f25acba
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,20 @@ function Invoke-AnalyzerExchangeInformation {
}

$extendedSupportDate = $exchangeInformation.BuildInformation.VersionInformation.ExtendedSupportDate
$exchangeFriendlyName = $exchangeInformation.BuildInformation.VersionInformation.FriendlyName
if ($extendedSupportDate -le ([DateTime]::Now.AddYears(1))) {
$displayWriteType = "Yellow"

if ($extendedSupportDate -le ([DateTime]::Now.AddDays(178))) {
$displayWriteType = "Red"
}

$displayValue = "$($exchangeInformation.BuildInformation.VersionInformation.ExtendedSupportDate.ToString("MMM dd, yyyy",
[System.Globalization.CultureInfo]::CreateSpecificCulture("en-US"))) - Please note of the End Of Life date and plan to migrate soon."
if (($exchangeFriendlyName -match '2010|2013|2016|2019')) {
$displayValue = "$($exchangeInformation.BuildInformation.VersionInformation.ExtendedSupportDate.ToString("MMM dd, yyyy",
[System.Globalization.CultureInfo]::CreateSpecificCulture("en-US"))) - Please note the End Of Life date. Reference our blog for more information: https://aka.ms/HC-UpgradeToSE"
} else {
$displayValue = "Please note the End Of Life date and plan your migration accordingly."
}

if ($extendedSupportDate -le ([DateTime]::Now)) {
$displayValue = "Error: Your Exchange server reached end of life on " +
Expand Down Expand Up @@ -146,7 +151,7 @@ function Invoke-AnalyzerExchangeInformation {
foreach ($kbInfo in $exchangeInformation.BuildInformation.KBsInstalledInfo) {
$kbName = $kbInfo.PackageName
$params = $baseParams + @{
Details = "$kbName - Installed on $($kbInfo.InstalledDate)"
Details = "$kbName"
DisplayCustomTabNumber = 2
TestingName = "Exchange IU"
}
Expand Down

0 comments on commit f25acba

Please sign in to comment.