Bug in PowerCLI 5.5 Get-LicenseDataManager cmdlet 9

While setting up a new vSphere 5.5 environment, I believe I have stumbled across a bug in PowerCLI 5.5.  I use Auto Deploy in this particular environment and I hit this issue while trying to set up bulk licensing.

For those of you that have not heard of bulk licensing, it is a feature you can activate via PowerCLI that allows you to assign a license key to a datacenter object in your vSphere environment.  All hosts that are a child object of that datacenter then automatically inherit and are assigned that particular license key.  This eliminates the need to manually assign licenses to the hosts in your environment.  You can read more about it bulk licensing by visiting this link.

Now on to the bug…

I ran both of these commands against the same vCenter Server running version 5.5.  I believe the version of vCenter Server is irrelevant in this case though.  To prove this bug, I used a fresh Windows 7 virtual machine and installed PowerCLI version 5.1.  I then upgraded to PowerCLI 5.5 and re-executed the same cmdlet.  See my output below:

PowerCLI 5.1 execution:

PowerCLI C:\PowerCLI> Get-PowerCLIVersion
 
PowerCLI Version
----------------
VMware vSphere PowerCLI 5.1 Release 1 build 793510
---------------
Snapin Versions
---------------
VMWare AutoDeploy PowerCLI Component 5.1 build 768137
VMWare ImageBuilder PowerCLI Component 5.1 build 768137
VMware vCloud Director PowerCLI Component 1.5 build 793505
VMware License PowerCLI Component 5.1 build 669840
VMware vSphere PowerCLI Component 5.1 build 793489
 
PowerCLI C:\PowerCLI> Get-LicenseDataManager
 
Uid
---
/VIServer=pq\tpatters@esxi1.lab:443/LicenseDataManager=LicenseDataManager/

PowerCLI 5.5 execution:

PowerCLI C:\PowerCLI> Get-PowerCLIVersion
 
PowerCLI Version
----------------
VMware vSphere PowerCLI 5.5 Release 1 build 1295336
---------------
Snapin Versions
---------------
VMWare AutoDeploy PowerCLI Component 5.5 build 1262826
VMWare ImageBuilder PowerCLI Component 5.5 build 1262826
VMware vCloud Director PowerCLI Component 5.5 build 1295337
VMware License PowerCLI Component 5.5 build 1265954
VMware VDS PowerCLI Component 5.5 build 1295334
VMware vSphere PowerCLI Component 5.5 build 1295334
 
PowerCLI C:\PowerCLI> Get-LicenseDataManager
Get-LicenseDataManager : 10/16/2013 11:00:49 AM Get-LicenseDataManager Could not load file or assembly 'VMware.V
im, Version=5.1.0.0, Culture=neutral, PublicKeyToken=10980b081e887e9f' or one of its dependencies. The system cannot find
the file specified.
At line:1 char:23
+ Get-LicenseDataManager <<<<
+ CategoryInfo : NotSpecified: (:) [Get-LicenseDataManager], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.License.Commands.GetLicenseDataManager

As you can see, the PowerCLI 5.1 version of this cmdlet completes successfully while the 5.5 version fails.  It appears that the 5.5 version is referencing an older PowerCLI API call.

My suggestion for a workaround would be to keep a version of PowerCLI 5.1 handy to work with the license data manager object.  I have confidence that VMware will get this fixed in the very near future.  I am working to report this bug up to them.