Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 232869

Re: Powercli to set ESXi free license

$
0
0

Hi Robert,

 

Sorry to bother you again, but I really don't know how to set license key ...

 

I've rtied your commands, and it shows no more errors, they gave me this :

$ServiceInstance     = Get-View ServiceInstance

     ServerClock : 08/03/2013 07:32:48
     Capability  : VMware.Vim.Capability
     Content     : VMware.Vim.ServiceContent
     MoRef       : ServiceInstance-ServiceInstance
     Client      : VMware.Vim.VimClient

 

$LicenseManager      = $ServiceInstance.Content.LicenseManager

     Type                                                                           Value                                                                        
     ----                                                                               -----                                                                        
     LicenseManager                                                           ha-license-manager

 

$LicenseManagerView = Get-View $LicenseManager

     Source                   :
     SourceAvailable          : False
     Diagnostics              :
     FeatureInfo              : {}
     LicensedEdition          :
     Licenses                 : {Evaluation Mode}
     LicenseAssignmentManager :
     Evaluation               : VMware.Vim.LicenseManagerEvaluationInfo
     LinkedView               :
     MoRef                    : LicenseManager-ha-license-manager
     Client                   : VMware.Vim.VimClient

 

$ESXLicense         = $LicenseManagerView.Licenses

     LicenseKey      : 00000-00000-00000-00000-00000
     EditionKey      : eval
     Name            : Evaluation Mode
     Total           : 1
     Used            : 1
     CostUnit        : host
     Properties      : {ProductName, ProductVersion, evaluation, expirationHours...}
     Labels          :
     DynamicType     :
     DynamicProperty :

 

 

 

When I try

$esxLicense.Set           = "My_ESXi_License_Number"

     error :

     Cannot set the Value property for PSMemberInfo object of type "System.Management.Automation.PSMethod".
     At line:40 char:13
     + $esxLicense. <<<< SetValue = "XXXX-XXXXX-xxxxx-xxxxx-XXXXX"
         + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
         + FullyQualifiedErrorId : PropertyAssignmentException

 

$esxLicense.SetValue   = "My_ESXi_License_Number"

     error:

     Cannot set the Value property for PSMemberInfo object of type "System.Management.Automation.PSMethod".
     At line:40 char:13
    + $esxLicense. <<<< Set = "XXXX-XXXXX-xxxxx-xxxxx-XXXXX"
         + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
         + FullyQualifiedErrorId : PropertyAssignmentException

 

 

I'm also trying $LicenseManagerView.AddLicense("XXXX-XXXXX-xxxxx-xxxxx-XXXXX", ??,??)

and $LicenseManagerView.UpdateLicense("XXXX-XXXXX-xxxxx-xxxxx-XXXXX", ??,??)

this ?? means I don't know how to fill ... :/

 

 

 

On the others ESXi manually installed, I have this :

LicenseKey        : XXXX-XXXXX-xxxxx-xxxxx-XXXXX
EditionKey         : esxBasic.vram
Name                 : VMware vSphere 5 Hypervisor
Total                     : 0
Used                      : 1
CostUnit             : cpuPackage
Properties           : {ProductName, ProductVersion, count_disabled, feature...}
Labels                    :
DynamicType          :
DynamicProperty      :

 

Thanks,

 

Julien


Viewing all articles
Browse latest Browse all 232869

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>