adds community contribution for CiscoUCS connection fix (#63)

#### 📖 Summary

- relates to #53

#### 📑 Test Plan

> 💡 Select your test plan for the code changes.

- [x] Tested via Drone.io pipeline
- [ ] Custom test
- [ ] No test plan

##### Details / Justification

<!-- Add your test details or justification for missing tests here. -->

#### 📚 Additional Notes

<!-- A place for additional detail notes. -->

Co-authored-by: OCram85 <marco.blessing@googlemail.com>
Reviewed-on: OCram85/PSCredentialStore#63
This commit is contained in:
OCram85 2022-07-15 11:25:11 +02:00
parent 3d90d912ee
commit a66e8249db

View File

@ -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)
}