From 9ddd3734036fd499e16005c9cbc0fb3c7705a552 Mon Sep 17 00:00:00 2001 From: David Paulson Date: Tue, 2 Jul 2024 15:55:49 -0500 Subject: [PATCH] Allow other features to work from a tools box --- .../HealthChecker/Helpers/Invoke-ConfirmExchangeShell.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Diagnostics/HealthChecker/Helpers/Invoke-ConfirmExchangeShell.ps1 b/Diagnostics/HealthChecker/Helpers/Invoke-ConfirmExchangeShell.ps1 index f1352de8a0..81bcc6803f 100644 --- a/Diagnostics/HealthChecker/Helpers/Invoke-ConfirmExchangeShell.ps1 +++ b/Diagnostics/HealthChecker/Helpers/Invoke-ConfirmExchangeShell.ps1 @@ -22,7 +22,8 @@ function Invoke-ConfirmExchangeShell { if ($Script:ExchangeShellComputer.ToolsOnly -and $Script:ServerNameList.ToLower().Contains($env:COMPUTERNAME.ToLower()) -and - -not ($LoadBalancingReport)) { + ($PSCmdlet.ParameterSetName -eq "HealthChecker" -or + $PSCmdlet.ParameterSetName -eq "MailboxReport")) { Write-Warning "Can't run Exchange Health Checker Against a Tools Server. Use the -Server Parameter and provide the server you want to run the script against." $Script:Logger.PreventLogCleanup = $true exit