Skip to content

[Issue] - Health Checker - Check for dynamic memory has a rounding issue #2203

@thomass4t

Description

@thomass4t

Provide Version Number
Version 24.09.17.1810

Describe the issue
When running the script, I receive the erorr message
"Dynamic Memory Detected: True 25.390625GB is the allowed dynamic memory of the server. Not supported to have dyn
amic memory configured."

Exchange is running as a Hyper-V machine and is not configured for dynamic memory.
The problem might arise from the PowerShell-Check:
} elseif (($counter.CookedValue / 1024) -ne $totalPhysicalMemory) {
$totalPhysicalMemory is 25 in our case and the left hand side results to 25,390625

Expected behavior
The error should not be shown if dynamic memory is disabled.

Script Output
see above snippet

Additional context
The Variable totalPhysicalMemory is already a rounded value:
$totalPhysicalMemory = [Math]::Round($hardwareInformation.TotalMemory / 1MB)
and shouldn't be compared with an unrounded float value.
$hardwareInformation.TotalMemory / 1024 / 1024 would be equal to $counter.CookedValue in my case (both exactly 26000)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions