VMware Cloud Community
VMpso
Contributor
Contributor
Jump to solution

Issues with PowerCLI 10

I recently updated my installation of PowerCLI. I had the old MSI install, so I uninstalled that and ran the command to install the new module.

Unfortunately, I cannot load the modules. I have uninstalled and reinstalled multiple times. Each uninstall I made sure to delete the modules from C:\Program Files\WindowsPowerShell\Modules and to reboot.

I keep bouncing between these two errors.

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

Import-Module : Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified.

PowerShell is version 5.1. OS is Windows 7.

Any help is appreciated.

1 Solution

Accepted Solutions
SupreetK
Commander
Commander
Jump to solution

Reply
0 Kudos
3 Replies
SupreetK
Commander
Commander
Jump to solution

Check if this https://infiniteloop.io/vmware-powercli-10-setup/​ is of any help.

Cheers,

Supreet

Reply
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Something similar was reported in the PowerCLI slack channel in VMware{code}.

The user reporting the problem was able to "fix" it by doing

  • I made a folder `C:\Windows\assembly\GAC_64\log4net\1.2.10.0__692fbea5521e1304`
  • and copied the log4net.dll from `"C:\Program Files\WindowsPowerShell\Modules\VMware.VimAutomation.Sdk\10.1.0.8342078\net45\log4net.dll"` to it
  • start a fresh pssessionand it works

Can you try if that works for you as well?


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

Reply
0 Kudos
VMpso
Contributor
Contributor
Jump to solution

Interestingly enough, Windows would not allow me to create a folder in C:\Windows\Assembly through the GUI. It doesn't even show me the folders, only files. I was able to get it to work through Powershell, which is why I marked SupreetK answer correct.

Thank you both for your assistance!