Skip to content

Commit 2d8807f

Browse files
authored
Merge pull request #2547 from microsoft/dpaul-HCDev
Health Checker: Quick output fixes (#2524, #2381, #2508)
2 parents 3c803d0 + 96bf8db commit 2d8807f

8 files changed

Lines changed: 23 additions & 12 deletions

File tree

Diagnostics/HealthChecker/Analyzer/Invoke-AnalyzerExchangeInformation.ps1

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,13 @@ function Invoke-AnalyzerExchangeInformation {
335335
}
336336
}
337337
} else {
338-
$displayMissingGroups.Add("Unable to determine Local System Membership as the results were blank.")
338+
if ($null -ne $exchangeInformation.ADComputerObject.LocalGroupMemberException -and
339+
$exchangeInformation.ADComputerObject.LocalGroupMemberException.Exception -is [System.InvalidOperationException] -and
340+
$HealthServerObject.OSInformation.BuildInformation.BuildVersion -lt [System.Version]"10.0.26100") {
341+
$displayMissingGroups.Add("Unable to determine Local System Membership. This can occur when orphaned SIDs exist in the local Administrators group.")
342+
} else {
343+
$displayMissingGroups.Add("Unable to determine Local System Membership as the results were blank.")
344+
}
339345
}
340346

341347
if ($null -ne $exchangeInformation.ADComputerObject.ADGroupMembership -and

Diagnostics/HealthChecker/Analyzer/Invoke-AnalyzerOsInformation.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -400,15 +400,15 @@ function Invoke-AnalyzerOsInformation {
400400
$displayWriteType2012 = "Green"
401401
$displayValue2012 = "$($installed2012.DisplayVersion) Version is current"
402402
} elseif (Test-VisualCRedistributableInstalled -Year 2012 -Installed $osInformation.VcRedistributable) {
403-
$displayValue2012 = "Redistributable ($($installed2012.DisplayVersion)) is outdated"
403+
$displayValue2012 = "Redistributable is outdated ($($installed2012.DisplayVersion)). Update the Visual C++ 2012 version."
404404
$displayWriteType2012 = "Yellow"
405405
}
406406

407407
if (Test-VisualCRedistributableUpToDate -Year 2013 -Installed $osInformation.VcRedistributable) {
408408
$displayWriteType2013 = "Green"
409409
$displayValue2013 = "$($installed2013.DisplayVersion) Version is current"
410410
} elseif (Test-VisualCRedistributableInstalled -Year 2013 -Installed $osInformation.VcRedistributable) {
411-
$displayValue2013 = "Redistributable ($($installed2013.DisplayVersion)) is outdated"
411+
$displayValue2013 = "Redistributable is outdated ($($installed2013.DisplayVersion)). Update the Visual C++ 2013 version."
412412
$displayWriteType2013 = "Yellow"
413413
}
414414
}
@@ -435,7 +435,7 @@ function Invoke-AnalyzerOsInformation {
435435
$displayWriteType2012 -eq "Yellow") {
436436

437437
$params = $baseParams + @{
438-
Details = "Note: For more information about the latest C++ Redistributable please visit: https://aka.ms/HC-LatestVC`r`n`t`tThis is not a requirement to upgrade, only a notification to bring to your attention."
438+
Details = "Note: Exchange requires the Visual C++ 2012 and 2013 Redistributable specifically. These are not replaced by newer versions.`r`n`t`tFor more information please visit: https://aka.ms/HC-LatestVC"
439439
DisplayWriteType = "Yellow"
440440
DisplayCustomTabNumber = 2
441441
}

Diagnostics/HealthChecker/Analyzer/Security/Invoke-AnalyzerSecurityMitigationService.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ function Invoke-AnalyzerSecurityMitigationService {
129129
}
130130

131131
$params = $baseParams + @{
132-
Details = "Run: 'Get-Mitigations.ps1' from: '$ExScripts' to learn more."
132+
Details = "Run: 'Get-Mitigations.ps1' from: '$([System.IO.Path]::Combine($exchangeInformation.RegistryValues.MsiInstallPath, "Scripts"))' to learn more."
133133
DisplayCustomTabNumber = 2
134134
}
135135
Add-AnalyzedResultInformation @params

Diagnostics/HealthChecker/DataCollection/ExchangeInformation/Invoke-JobExchangeInformationLocal.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ function Invoke-JobExchangeInformationLocal {
124124
$localGroupMember = Get-LocalGroupMember -SID "S-1-5-32-544" -ErrorAction Stop
125125
} catch {
126126
Write-Verbose "Failed to run Get-LocalGroupMember. Inner Exception: $_"
127+
$localGroupMemberException = $_
127128
Invoke-CatchActions
128129
}
129130
}
@@ -210,6 +211,7 @@ function Invoke-JobExchangeInformationLocal {
210211
IanaTimeZoneMappingsRaw = $ianaTimeZoneMappingContent
211212
FileContentInformation = $fileContentInformation
212213
LocalGroupMember = $localGroupMember
214+
LocalGroupMemberException = $localGroupMemberException
213215
RemoteJob = $true -eq $PSSenderInfo
214216
JobHandledErrors = $jobHandledErrors
215217
AllErrors = $Error

Diagnostics/HealthChecker/Features/Get-HealthCheckerDataObject.ps1

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,10 @@ function Get-HealthCheckerDataObject {
127127
VirtualDirectories = $ExchangeCmdletResult.VirtualDirectories
128128
ExchangeCertificateInformation = $exchangeCertificateInformation
129129
ADComputerObject = [PSCustomObject]@{
130-
ADObject = $ExchangeCmdletResult.ADObject.ComputerObject
131-
ADGroupMembership = $ExchangeCmdletResult.ADObject.GroupMembership
132-
LocalGroupMember = $ExchangeLocalResult.LocalGroupMember
130+
ADObject = $ExchangeCmdletResult.ADObject.ComputerObject
131+
ADGroupMembership = $ExchangeCmdletResult.ADObject.GroupMembership
132+
LocalGroupMember = $ExchangeLocalResult.LocalGroupMember
133+
LocalGroupMemberException = $ExchangeLocalResult.LocalGroupMemberException
133134
}
134135
AES256CBCInformation = $ExchangeLocalResult.AES256CBCInformation
135136
ApplicationConfigFileStatus = $ExchangeLocalResult.ApplicationConfigFileStatus

Diagnostics/HealthChecker/Tests/HealthChecker.E16.Main.Tests.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ Describe "Testing Health Checker by Mock Data Imports - Exchange 2016" {
5858
TestObjectMatch "Power Plan" "Balanced --- Error"-WriteType "Red"
5959
$httpProxy = GetObject "Http Proxy Setting"
6060
$httpProxy.ProxyAddress | Should -Be "None"
61-
TestObjectMatch "Visual C++ 2012 x64" "Redistributable (11.0.50727) is outdated" -WriteType "Yellow"
62-
TestObjectMatch "Visual C++ 2013 x64" "Redistributable (12.0.21005) is outdated" -WriteType "Yellow"
61+
TestObjectMatch "Visual C++ 2012 x64" "Redistributable is outdated (11.0.50727). Update the Visual C++ 2012 version." -WriteType "Yellow"
62+
TestObjectMatch "Visual C++ 2013 x64" "Redistributable is outdated (12.0.21005). Update the Visual C++ 2013 version." -WriteType "Yellow"
6363
TestObjectMatch "Server Pending Reboot" $false
6464

6565
$pageFile = GetObject "PageFile Size 0"

Diagnostics/HealthChecker/Tests/HealthChecker.E19.Main.Tests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ Describe "Testing Health Checker by Mock Data Imports" {
127127
$httpProxy = GetObject "Http Proxy Setting"
128128
$httpProxy.ProxyAddress | Should -Be "None"
129129
TestObjectMatch "Visual C++ 2012 x64" "11.0.61030 Version is current" -WriteType "Green"
130-
TestObjectMatch "Visual C++ 2013 x64" "Redistributable (12.0.21005) is outdated" -WriteType "Yellow"
130+
TestObjectMatch "Visual C++ 2013 x64" "Redistributable is outdated (12.0.21005). Update the Visual C++ 2013 version." -WriteType "Yellow"
131131
TestObjectMatch "Server Pending Reboot" $false
132132

133133
$pageFile = GetObject "PageFile Size 0"

docs/Diagnostics/HealthChecker/VisualCRedistributableVersionCheck.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
**Description:**
44

5-
We check if the the latest Visual C++ Redistributable version, required for the installed Exchange server role, is installed or not.
5+
We check if the Visual C++ Redistributable versions required for the installed Exchange server role are installed and up to date. Exchange Server specifically requires the [Visual C++ 2012 (VC++ 11.0)](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2012-vc-110-update-4-no-longer-supported) and [Visual C++ 2013 (VC++ 12.0)](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2013-vc-120-no-longer-supported) Redistributable. These older versions are **not** replaced by newer Visual C++ Redistributable versions (e.g., the latest Visual C++ 2015-2022 Redistributable) and must remain installed.
6+
7+
When Health Checker reports that a version is "outdated", it means the installed version of that specific year's Redistributable (2012 or 2013) needs to be updated to the latest release within that same series.
68

79
**Included in HTML Report?**
810

0 commit comments

Comments
 (0)