Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwisPowerShell 3.2.0.50049 is incompatible with VMWare.PowerCli in PS7 #348

Open
fullenw1 opened this issue Sep 7, 2023 · 0 comments
Open

Comments

@fullenw1
Copy link

fullenw1 commented Sep 7, 2023

Both were working just fine until I upgraded SwisPowerShell to version 3.2.0.50049.

Now, if I load SwisPowerShell first I cannot load VMWare.PowerCli anymore.
And if I load VMWare.PowerCli first, then the Connect-Swis cmdlet returns an error.

This behavior only appears in a PowerShell 7 host (7.3.6 precisely in my case).

Loading SwisPowerShell first

PS> Connect-Swis -Hostname $OrionDatabaseServer -Credential $OrionCred

OperationTimeout Channel ClientChannel ChannelFactory
---------------- ------- ------------- --------------
01:00:00                               System.ServiceModel.ChannelFactory`1[SolarWinds.InformationService.Contract2.IStreamInformationServiceChannel]

PS>  Import-Module -Name VMware.PowerCLI
Import-Module: Unable to find type [VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory].

Loading VMware.PowerCLI first

PS>  Import-Module -Name VMware.PowerCLI
          Welcome to VMware PowerCLI!

Log in to a vCenter Server or ESX host:              Connect-VIServer
To find out what commands are available, type:       Get-VICommand
To show searchable help for all PowerCLI commands:   Get-PowerCLIHelp
Once you've connected, display all virtual machines: Get-VM
If you need more help, visit the PowerCLI community: Get-PowerCLICommunity

       Copyright (C) VMware, Inc. All rights reserved.
 
PS> Connect-Swis -Hostname $OrionDatabaseServer -Credential $OrionCred
Connect-Swis: The type initializer for 'SolarWinds.InformationService.Contract2.InfoServiceProxy' threw an exception.

Troubleshooting

What is strange is that even after unloading the other module, the issue still remains in both cases.

As a workaround, downgrading SwisPowerShell to version 3.1.0.343 fixes the issue.

I noticed this behavior only in a PS7 host.
So using a PowerShell 5.1 host can be another workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant