Kaffeeknecht
Contributor
Contributor

Connect-HVServer fails because VMware.VimAutomation.logging.SoapInterceptor cannot be loaded

Hi!

Im trying to get started in automating Horizon View using PowerCLI.

On my Windows 7 box :

PS C:\Windows\system32> $PSVersionTable

Name                           Value

----                           -----

PSVersion                      5.1.14409.

PSEdition                      Desktop

PSCompatibleVersions           {1.0, 2.0,

BuildVersion                   10.0.14409

CLRVersion                     4.0.30319.

WSManStackVersion              3.0

PSRemotingProtocolVersion      2.3

I installed PowerCLI from PSGallery

PS C:\Windows\system32> Get-Module Vmware* -ListAvailable

    Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version    Name                                ExportedCommands

---------- -------    ----                                ----------------

Script     6.7.0.1... VMware.DeployAutomation             {Add-DeployRule, Add-ProxyServer, Add-ScriptBundle, Copy-D...

Script     6.7.0.1... VMware.ImageBuilder                 {Add-EsxSoftwareDepot, Add-EsxSoftwarePackage, Compare-Esx...

Manifest   11.2.0.... VMware.PowerCLI

Script     6.7.0.1... VMware.Vim

Script     11.2.0.... VMware.VimAutomation.Cis.Core       {Connect-CisServer, Disconnect-CisServer, Get-CisService}

Script     11.0.0.... VMware.VimAutomation.Cloud          {Add-CIDatastore, Connect-CIServer, Disconnect-CIServer, G...

Script     11.2.0.... VMware.VimAutomation.Common

Script     11.2.0.... VMware.VimAutomation.Core           {Add-PassthroughDevice, Add-VirtualSwitchPhysicalNetworkAd...

Script     11.2.0.... VMware.VimAutomation.Hcx            {Connect-HCXServer, Disconnect-HCXServer, Get-HCXAppliance...

Script     7.6.0.1... VMware.VimAutomation.HorizonView    {Connect-HVServer, Disconnect-HVServer}

Script     10.0.0.... VMware.VimAutomation.License        Get-LicenseDataManager

Script     11.2.0.... VMware.VimAutomation.Nsxt           {Connect-NsxtServer, Disconnect-NsxtServer, Get-NsxtPolicy...

Script     11.2.0.... VMware.VimAutomation.Sdk            {Get-ErrorReport, Get-InstallPath, Get-PSVersion}

Script     11.0.0.... VMware.VimAutomation.Security       {Get-SecurityInfo, Get-VTpm, Get-VTpmCertificate, Get-VTpm...

Script     11.2.0.... VMware.VimAutomation.Srm            {Connect-SrmServer, Disconnect-SrmServer}

Script     11.2.0.... VMware.VimAutomation.Storage        {Add-KeyManagementServer, Copy-VDisk, Export-SpbmStoragePo...

Script     1.3.0.0    VMware.VimAutomation.StorageUtility Update-VmfsDatastore

Script     11.2.0.... VMware.VimAutomation.Vds            {Add-VDSwitchPhysicalNetworkAdapter, Add-VDSwitchVMHost, E...

Script     11.2.0.... VMware.VimAutomation.Vmc            {Connect-Vmc, Disconnect-Vmc, Get-VmcSddcNetworkService, G...

Script     10.0.0.... VMware.VimAutomation.vROps          {Connect-OMServer, Disconnect-OMServer, Get-OMAlert, Get-O...

Script     6.5.1.7... VMware.VumAutomation                {Add-EntityBaseline, Copy-Patch, Get-Baseline, Get-Complia...

I tried Importing only PowerCLI, VimAutomation.HorizonView and both (trying both modules first). Also tried Installing VimAutomation.Sdk explcititly.

But when I try to connect to a HV server, I get (also tried with passing credentials, domain):

PS C:\Windows\system32> Connect-HVServer -server vdi-xxxxx.xxx.de

Connect-HVServer : Die Datei oder Assembly "VMware.VimAutomation.Logging.SoapInterceptor, Version=1.0.0.570,

Culture=neutral, PublicKeyToken=null" oder eine Abh���ngigkeit davon wurde nicht gefunden. Das System kann die

angegebene Datei nicht finden.

At line:1 char:1

+ Connect-HVServer -server vdi-connect01.resource.sonia.de

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

    + CategoryInfo          : NotSpecified: (:) [Connect-HVServer], FileNotFoundException

    + FullyQualifiedErrorId : System.IO.FileNotFoundException,VMware.VimAutomation.HorizonView.Commands.Cmdlets.Connec

   tHVServer

How can I get this thing working?

Kind regards,

David

0 Kudos
8 Replies
LucD
Leadership
Leadership

Do you have a station with EN-US instead of DE-DE?
It might be a regional settings/language thing,


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

0 Kudos
Kaffeeknecht
Contributor
Contributor

Hi Luc!

Thank you for your answer. Unfortunately it didn't solve my problem.

When I look at the available VMware.*-Modules, shouldn't there be a VMware.VimAutomation.Logging Module?

I can neither see nor install it.

Kind regards,

David

0 Kudos
LucD
Leadership
Leadership

No, that module doesn't exist afaik.

modules.png

Do you see this error on all stations?

Or only on one?


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

0 Kudos
LucD
Leadership
Leadership

It might be that your installation got somehow corrupted.
I would suggest to do a complete uninstall of PowerCLI, reboot and reinstall.

See a similar issue in Power CLI 6.5.1 Connection error: Connect-VIServer : Could not load file or assembly ‘VMware.VimAuto...


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

0 Kudos
Kaffeeknecht
Contributor
Contributor

I took a fresh Windows 10 Installation (ENG) and a fresh Windows Server 2016 Installation (ENG)

and did Install-Module and Import-Module with VMware.PowerCLI.

Both gave back the error.

In addition to that. A colleague had a running PowerCLI version 10.0.1. He tested because I asked him to do so and it worked. After that he updated to 11.2 (ignoring my warnings). Now his PowerCLI throws the same error.

Kind regards,

David

0 Kudos
LucD
Leadership
Leadership

In that case you better open a SR


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

0 Kudos
Kaffeeknecht
Contributor
Contributor

Will do so.

Thank you!

Kind regards,

David

0 Kudos
LucD
Leadership
Leadership

GSS might tell you that you need a Developer Support contract for PowerCLI, that is not true in all cases.

Point them to PowerCLI Support Breakdown


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

0 Kudos