VMware Cloud Community
VIR2AL3X
Enthusiast
Enthusiast
Jump to solution

PowerCLI 6.0 R2 - Exception calling "OnImportModule" error on Windows 10

Hello - I am looking for some support on this little issue.  When running PowerCLI 6.0 R2 on Windows 10 x64, I receive the following exception message at the top of the window and I'd like to figure out how to resolve it.  I have spoke briefly with Brian Graf but he was unsure of how to resolve this and mentioned that this version of PowerCLI is not yet "technically" compatible with Windows 10, although it may still work for the most part.  Can anyone help me out please?

Error Message:

Exception calling "OnImportModule" with "2" argument(s): "A provider is not

available for the following required component service: LicenseService"

At C:\Program Files (x86)\VMware\Infrastructure\vSphere

PowerCLI\Modules\VMware.VimAutomation.License\Initialize-SDKComponent.ps1:1

char:1

+ [VMware.VimAutomation.Sdk.Interop.V1.CoreServiceFactory]::CoreService ...

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

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : NotSupportedException

PowerCLI.png

0 Kudos
1 Solution

Accepted Solutions
VIR2AL3X
Enthusiast
Enthusiast
Jump to solution

LucD, Indeed!

So I guess I must have a messed up installation of Windows on the machine I was using.  I spun up (2) brand new Windows 10 VMs (builds 10240 & 10547), installed PowerCLI 6.0 R2 on each, rebooted, and launch the application.  No errors at all!  Looks like it's time for me to rebuild my Tech Workstation.  Thanks for your help all!

2015-10-02_13-06-11.png2015-10-02_13-06-28.png

View solution in original post

0 Kudos
15 Replies
LucD
Leadership
Leadership
Jump to solution

Seems to be working for me.

Just to make sure, this is on Windows 10 RTM ?

Did you logon as an administrator or a regular user ?

Which PowerShell version do you have on the box ?

win10.png


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

0 Kudos
RvdNieuwendijk
Leadership
Leadership
Jump to solution

I have the same problem with PowerCLI 6.0 Release 2 on Windows 8.1 and PowerShell 5.0. Unfortunately only PowerShell 3.0 and 4.0 are supported with PowerCLI 6.0 Release 2.

PowerCLI 6.0R2 problem.PNG

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
0 Kudos
LucD
Leadership
Leadership
Jump to solution

Out of curiosity tried it on Windows 8.1 with PowerShell v5 Production Preview.

I know it is not officially supported in that config, but where could the differences in behavior come from ?

pcli81.png


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

0 Kudos
VIR2AL3X
Enthusiast
Enthusiast
Jump to solution

LucD‌, I am running as a local user that is an administrator on Windows 10 Enterprise x64 (Insider Build 10547).  I was on (Build 10532) when I upgraded to PowerCLI 6.0 R2 and tested it out.  When I first upgraded to the new version I had an error with the Get-PowerCLIVersion as shown in the following pic. 

2015-10-01_15-03-12.jpg

I managed to resolve that by manually adding the PSModules path to the System Environment Variable.  I've also set the option to run PowerCLI as Administrator via properties.  After that was resolved as mentioned, I started getting this new error

2015-10-01_15-00-42.jpg

PSVersion = 5.0.10547.0

0 Kudos
LucD
Leadership
Leadership
Jump to solution

I got the Get-PowerCLIVersion error as well, but after a reboot that was fixed.

It's probably due to the system environment variable that is updated during the installation.

I run with an AD account, that is also a local admin on the PC


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

0 Kudos
VIR2AL3X
Enthusiast
Enthusiast
Jump to solution

Unfortunately, reboots or uninstall/reinstall did not work for me.  I manually had to add the environment variable as it would not get set during installation for some reason.  Also, this is not a domain joined machine as I am using it as a tech workstation to manage my environment(s).  Any suggestions to resolve this 2nd error message?

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Not really.

Perhaps something you could try, I did the PowerCLI 6R2 install on a brand new Win10 box, no patches.


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

0 Kudos
Craig_Baltzer
Expert
Expert
Jump to solution

Just an additional data point, I'm running 6.0 U2 on a non-domain joined Windows 10 RTM workstation (which was upgraded from Windows 8.1). Logged on with a MS account, nothing special done other than a reboot after installing the 6.0 U2 package and all seems to function fine.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Out of curiosity, is that a fully patched Win10 installation ?


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

0 Kudos
Craig_Baltzer
Expert
Expert
Jump to solution

Yes, fully patched (I've received/installed updates a couple of times since I installed 6.0 U2 and everything continues to work)

0 Kudos
VIR2AL3X
Enthusiast
Enthusiast
Jump to solution

I am going to spin up a new Win10 machine and try installing it again.  I wonder if this is a compatibility issue with the newer insider preview builds (105xx) vs the RTM build (10240)

0 Kudos
Craig_Baltzer
Expert
Expert
Jump to solution

I'm on the insider slow ring so I'm still at build 10240...

0 Kudos
VIR2AL3X
Enthusiast
Enthusiast
Jump to solution

I'm on the fast ring and recently upgraded to 10540.  I was on 10532 when I upgraded PowerCLI.  Could be some new things in these newer builds that is causing the issue.  I am going to spin up a 10240 build and try again.  Will report back ASAP.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

But let's not forget that "officially" Win10 and PowerShell 5 are not supported Smiley Wink


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

0 Kudos
VIR2AL3X
Enthusiast
Enthusiast
Jump to solution

LucD, Indeed!

So I guess I must have a messed up installation of Windows on the machine I was using.  I spun up (2) brand new Windows 10 VMs (builds 10240 & 10547), installed PowerCLI 6.0 R2 on each, rebooted, and launch the application.  No errors at all!  Looks like it's time for me to rebuild my Tech Workstation.  Thanks for your help all!

2015-10-02_13-06-11.png2015-10-02_13-06-28.png

0 Kudos