diff --git a/Diagnostics/HealthChecker/Helpers/Get-HealthCheckFilesItemsFromLocation.ps1 b/Diagnostics/HealthChecker/Helpers/Get-HealthCheckFilesItemsFromLocation.ps1 index a3426e373c..6adc675f12 100644 --- a/Diagnostics/HealthChecker/Helpers/Get-HealthCheckFilesItemsFromLocation.ps1 +++ b/Diagnostics/HealthChecker/Helpers/Get-HealthCheckFilesItemsFromLocation.ps1 @@ -2,7 +2,9 @@ # Licensed under the MIT License. function Get-HealthCheckFilesItemsFromLocation { - $items = Get-ChildItem $XMLDirectoryPath | Where-Object { $_.Name -like "HealthChecker-*-*.xml" } + ##This notation will break things if you have other xml files from runs with different parameters like exchangedccoreratio + ##Filenames to exclude: *ExchangeDCCoreRatio* , all other reports generate txt-reports only + $items = Get-ChildItem $XMLDirectoryPath | Where-Object { $_.Name -like "HealthChecker-*-*.xml" -and $_.Name -notlike "HealthChecker-ExchangeDCCoreRatio-*.xml" } if ($null -eq $items) { Write-Host("Doesn't appear to be any Health Check XML files here....stopping the script")