From c14e6980d38e0e54e0f6369fc23bb9c5f38a435d Mon Sep 17 00:00:00 2001 From: Freddy Kristiansen Date: Mon, 29 Apr 2024 10:32:26 +0200 Subject: [PATCH] only if iswindows (#3521) Co-authored-by: freddydk --- BC.HelperFunctions.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BC.HelperFunctions.ps1 b/BC.HelperFunctions.ps1 index 39d236c4b..e787fea39 100644 --- a/BC.HelperFunctions.ps1 +++ b/BC.HelperFunctions.ps1 @@ -191,7 +191,7 @@ function Get-ContainerHelperConfig { } } - if ($bcContainerHelperConfig.useWinRmSession -ne 'never') { + if ($isWindows -and ($bcContainerHelperConfig.useWinRmSession -ne 'never')) { # useWinRmSession should be never if the service isn't running $service = get-service WinRm -erroraction SilentlyContinue if ($service -and $service.Status -ne "Running") {