VMware Cloud Community
rsteiner99
Contributor
Contributor
Jump to solution

bulk licensing with PowerCLI 6.0 Release 2 broken?

Hi there,

I successfully upgraded from PowerCLI 6.0 Release 1 to PowerCLI 6.0 Release 2.

After that, I wanted to add a new license to bulk license newly deployed ESXi Hosts with Auto Deploy but ran into the following error:

$licenseData = New-Object VMware.VimAutomation.License.Types.LicenseData

New-Object : Cannot find type [VMware.VimAutomation.License.Types.LicenseData]: verify that the assembly containing this type is loaded.

At line:1 char:16

+ $licenseData = New-Object VMware.VimAutomation.License.Types.LicenseData

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

    + CategoryInfo          : InvalidType: (:) [New-Object], PSArgumentException

    + FullyQualifiedErrorId : TypeNotFound,Microsoft.PowerShell.Commands.NewObjectCommand

I'm pretty sure this worked with PowerCLI 6.0 Release 1.

Did someone else run into it as well? Maybe any workarounds?

I appreciate your help.

cheers,

Ronny

1 Solution

Accepted Solutions
dmilov
VMware Employee
VMware Employee
Jump to solution

Hello,

This is a backward compatibility issue that was introduced in PowerCLI 6.0R2. It is going to be addressed very soon in a forthcoming patch release, but until then you can workaround

replacing

"VMware.VimAutomation.License.Types.LicenseData"

with

"VMware.VimAutomation.License.Types.V1.LicenseData"

Have in mind that if you do the above in order to make your script work and later upgrade your PowerCLI to newer version you'll need to revert this change in the scripts.

-Dimitar Milov

View solution in original post

8 Replies
RvdNieuwendijk
Leadership
Leadership
Jump to solution

I have the same problem with PowerCLI 6.0 Release 2.

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

Licensing was converted from a snap-in to a module in R2. Is the module loaded?

0 Kudos
rsteiner99
Contributor
Contributor
Jump to solution

the module is loaded. Get-LicenseDataManager Cmdlet is working so far.

0 Kudos
DaveIshmael
Enthusiast
Enthusiast
Jump to solution

Anyone figure this out yet?

0 Kudos
dmilov
VMware Employee
VMware Employee
Jump to solution

Hello,

This is a backward compatibility issue that was introduced in PowerCLI 6.0R2. It is going to be addressed very soon in a forthcoming patch release, but until then you can workaround

replacing

"VMware.VimAutomation.License.Types.LicenseData"

with

"VMware.VimAutomation.License.Types.V1.LicenseData"

Have in mind that if you do the above in order to make your script work and later upgrade your PowerCLI to newer version you'll need to revert this change in the scripts.

-Dimitar Milov

DaveIshmael
Enthusiast
Enthusiast
Jump to solution

That worked perfectly.  I was trying to find an updated version of the vSphere 6 documentation for Bulk Licensing that would include that very helpful information.  Does that exist somewhere?  If so, do you happen to have the link?

0 Kudos
admin
Immortal
Immortal
Jump to solution

As Dimitar pointed out, this is a backward compatibility issue that we've already fixed and will be releasing very soon. Once the official fix is out, the proposed namespace change will no longer be needed (or work for that matter). For this very reason, updating the official documentation wouldn't make much sense either.

One thing to reiterate on is - if you use the workaround, please keep in mind that you'll need to revert it once you apply the patch (that restores the namespace for this type). Therefore this is really just a temporary workaround that we only recommend you use in case you can't afford waiting for another week or two until the fix is out.

We should have been more careful in this case and not have let this one slip. Sorry for the inconveniences this may have caused!

Cheers,

Alex

0 Kudos
rsteiner99
Contributor
Contributor
Jump to solution

with the new release of PowerCLI 6.0 Release 3 this issue has been fixed.

thank you, Alex!

0 Kudos