VMware Cloud Community
greco827
Expert
Expert

PowerCLI 6.0 R1 - PowerGUI 3.8

Does anyone know if PowerGUI 3.8.0.129 supports PowerCLI 6.0 R1?  The commands which work fine in PowerCLI seem to be recognized in PowerGUI, but they throw an error.

Connect-VIServer : The type initializer for

'VMware.VimAutomation.Logging.SoapInterceptor.LoggingHelper' threw an exception.

At line:1 char:1

+ Connect-VIServer vcenter01dc -User xxxxxx -Password 'xxxxxx'

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [Connect-VIServer], TypeInitialization

   Exception

    + FullyQualifiedErrorId : System.TypeInitializationException,VMware.VimAutomation.

   ViCore.Cmdlets.Commands.ConnectVIServer

PS C:\windows\SysWOW64> Get-PSSnapin -Registered

Name        : VMware.DeployAutomation

PSVersion   : 3.0

Description : This Windows Powershell snap-in contains vSphere Auto Deploy related

              cmdlets for Rule-Based-Deployment

Name        : VMware.ImageBuilder

PSVersion   : 3.0

Description : This Windows PowerShell snap-in contains VMware ESXi Image Builder

              cmdlets used to generate custom images.

Name        : VMware.VimAutomation.Core

PSVersion   : 3.0

Description : This Windows PowerShell snap-in contains Windows PowerShell cmdlets for

              managing vSphere.

Name        : VMware.VimAutomation.License

PSVersion   : 3.0

Description : This Windows Powershell snap-in contains cmdlets for managing License

              components.

If you find this or any other answer useful please mark the answer as correct or helpful https://communities.vmware.com/people/greco827/blog
Tags (2)
0 Kudos
7 Replies
SophiaSupport
Contributor
Contributor

Hello,

Have you ever found a solution to this please?

Thanks in advance

Julien

0 Kudos
LucD
Leadership
Leadership

Why would you still want to use PowerGUI?

There haven't been any updates, and the latest versions of PowerSHell and PowerCLI are not supported.

There are many valid alternatives available.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
SophiaSupport
Contributor
Contributor

I do not use powergui, I have this very same error when connecting through PowerCLI.

0 Kudos
LucD
Leadership
Leadership

Is there a specific reason you are running PowerCLI 6.0R1?

I would advise an upgrade to PowerCLI 6.5R1.

Do you see the issue in PowerCLI 6.5R1 as well?

Does this happen on multiple stations?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
SophiaSupport
Contributor
Contributor

Sorry, let me be clearer: I do use PowerCLI 6.5 but I have the same error message than the original poster:

powercli_err.png

0 Kudos
SophiaSupport
Contributor
Contributor

Ok, I tried it on a device that is not set by my company and... it works! Maybe that some setting in McAffe or so is preventing the connection on our corporate devices???

0 Kudos
LucD
Leadership
Leadership

Could be.

There are many elements that could impact the proper loading.

  • What is in your Path environment variable
  • The .Net version that is installed
  • The content of the PSModulePath environment variable
  • ...

Perhaps try adding the -Verbose switch, possibly there will some more indications of what is causing the error.

You could also try running the following after the error

$_.Exception | Format-List -Force


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos