From b99d308b829341431493f29d338c83efd1014bd2 Mon Sep 17 00:00:00 2001 From: OCram85 Date: Fri, 15 Jul 2022 11:21:01 +0200 Subject: [PATCH] fix connection params --- src/Connection/Connect-To.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Connection/Connect-To.ps1 b/src/Connection/Connect-To.ps1 index be7b048..5c198a3 100644 --- a/src/Connection/Connect-To.ps1 +++ b/src/Connection/Connect-To.ps1 @@ -177,7 +177,7 @@ function Connect-To { switch ($Type) { "CiscoUcs" { try { - $handle = Connect-Ucs -Name $RemoteHost -Credential $creds -ErrorAction Stop + $handle = Connect-Ucs -Name $RemoteHost -Credential $creds -ErrorAction 'Stop' -NotDefault $ExecutionContext.SessionState.PSVariable.Set('DefaultUcs', $handle) }