diff --git a/Diagnostics/HealthChecker/Analyzer/Invoke-AnalyzerOsInformation.ps1 b/Diagnostics/HealthChecker/Analyzer/Invoke-AnalyzerOsInformation.ps1 index 7daa4bf08b..e49fd53613 100644 --- a/Diagnostics/HealthChecker/Analyzer/Invoke-AnalyzerOsInformation.ps1 +++ b/Diagnostics/HealthChecker/Analyzer/Invoke-AnalyzerOsInformation.ps1 @@ -156,6 +156,20 @@ function Invoke-AnalyzerOsInformation { AddHtmlOverviewValues = $true } Add-AnalyzedResultInformation @params + + if ($osInformation.NETFramework.MajorVersion -gt $recommendedNetVersion) { + # Generic information stating we are looking into supporting this version of .NET + # But don't use it till we update the supportability matrix + $displayValue = "Microsoft is working on .NET $($osInformation.NETFramework.FriendlyName) validation with Exchange" + + " and the recommendation is to not use .NET $($osInformation.NETFramework.FriendlyName) until it is officially added to the supportability matrix." + + $params = $baseParams + @{ + Details = $displayValue + DisplayWriteType = "Yellow" + DisplayCustomTabNumber = 2 + } + Add-AnalyzedResultInformation @params + } } $displayValue = [string]::Empty diff --git a/Shared/Get-NETFrameworkVersion.ps1 b/Shared/Get-NETFrameworkVersion.ps1 index 3e4ddee5a5..c96c262184 100644 --- a/Shared/Get-NETFrameworkVersion.ps1 +++ b/Shared/Get-NETFrameworkVersion.ps1 @@ -71,9 +71,12 @@ function Get-NETFrameworkVersion { } elseif ($NetVersionKey -lt $netVersionDictionary["Net4d8"]) { $friendlyName = "4.7.2" $minValue = $netVersionDictionary["Net4d7d2"] - } elseif ($NetVersionKey -ge $netVersionDictionary["Net4d8"]) { + } elseif ($NetVersionKey -lt $netVersionDictionary["Net4d8d1"]) { $friendlyName = "4.8" $minValue = $netVersionDictionary["Net4d8"] + } elseif ($NetVersionKey -ge $netVersionDictionary["Net4d8d1"]) { + $friendlyName = "4.8.1" + $minValue = $netVersionDictionary["Net4d8d1"] } } end { @@ -100,6 +103,7 @@ function GetNetVersionDictionary { "Net4d7d1" = 461308 "Net4d7d2" = 461808 "Net4d8" = 528040 + "Net4d8d1" = 533320 } } diff --git a/Shared/Tests/Get-NETFrameworkVersion.Tests.ps1 b/Shared/Tests/Get-NETFrameworkVersion.Tests.ps1 index abd3c57b95..171a6b4742 100644 --- a/Shared/Tests/Get-NETFrameworkVersion.Tests.ps1 +++ b/Shared/Tests/Get-NETFrameworkVersion.Tests.ps1 @@ -98,6 +98,14 @@ Describe "Testing $scriptName" { $result.MinimumValue | Should -Be $value $result.RegistryValue | Should -Be ($value + 1) } + + It ".NET 4.8.1" { + $value = 533320 + $result = Get-NETFrameworkVersion -NetVersionKey ($value + 1) + $result.FriendlyName | Should -Be "4.8.1" + $result.MinimumValue | Should -Be $value + $result.RegistryValue | Should -Be ($value + 1) + } } Context "Get Local .NET Version and debug" { @@ -189,5 +197,10 @@ Describe "Testing $scriptName" { $result = Get-NETFrameworkVersion -NetVersionShortName "Net4d8" $result.FriendlyName = "4.8" } + + It "NET 4.8.1" { + $result = Get-NETFrameworkVersion -NetVersionShortName "Net4d8d1" + $result.FriendlyName = "4.8.1" + } } }