From a66e8249dbb7f01c39170c541edc554c20caf485 Mon Sep 17 00:00:00 2001 From: Marco Blessing Date: Fri, 15 Jul 2022 11:25:11 +0200 Subject: [PATCH] adds community contribution for CiscoUCS connection fix (#63) #### :book: Summary - relates to #53 #### :bookmark_tabs: Test Plan > :bulb: Select your test plan for the code changes. - [x] Tested via Drone.io pipeline - [ ] Custom test - [ ] No test plan ##### Details / Justification #### :books: Additional Notes Co-authored-by: OCram85 Reviewed-on: https://gitea.ocram85.com/OCram85/PSCredentialStore/pulls/63 --- 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) }