PowerCLI

 View Only
  • 1.  Issues with PowerCLI 10

    Posted Oct 02, 2018 04:31 PM

    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.



  • 2.  RE: Issues with PowerCLI 10
    Best Answer

    Posted Oct 02, 2018 04:39 PM

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

    Cheers,

    Supreet



  • 3.  RE: Issues with PowerCLI 10

    Posted Oct 02, 2018 04:44 PM

    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?



  • 4.  RE: Issues with PowerCLI 10

    Posted Oct 03, 2018 02:10 PM

    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!