Automation

 View Only
  • 1.  PowerCLi - managing licences

    Posted Nov 14, 2017 10:07 AM

    Guys,

    Anybody know how to get and modify this VC Licence field in PowerCLI? I can't even find it in the MOB. Is it just a DB entry in VC maybe?....



  • 2.  RE: PowerCLi - managing licences

    Posted Nov 14, 2017 04:42 PM

    Invoke-Automation/add_license.ps1 at master · jpsider/Invoke-Automation · GitHub

    $MyVC = $DefaultVIServer
    $LicenseManager = get-view ($MyVC.ExtensionData.content.LicenseManager)
    $LicenseManager.AddLicense($VC_LIC,$null)
    $LicenseAssignmentManager = get-view ($LicenseManager.licenseAssignmentManager)
    $LicenseAssignmentManager.UpdateAssignedLicense($MyVC.InstanceUuid,$VC_LIC,$Null)

    check out Brian's post too:

    https://www.brianjgraf.com/2014/06/10/adding-license-keys-vcenter-powercli/



  • 3.  RE: PowerCLi - managing licences

    Posted Nov 15, 2017 09:35 AM

    Looking at your code, it seems to update the licence applied to the vCenter with a new one. My question was how to modify the "License" field highlighted yellow in the screen shot.

    This does not seem to be availble anywhere in the API that I can find.



  • 4.  RE: PowerCLi - managing licences

    Posted Nov 15, 2017 01:10 PM

    Ah, sorry. This is what I get for not reading the entire question. 

    What exactly do you want to edit?

    Let me get back to you.