Hi All,
I'm new member so thanks in advance for your help for my little problem .
I have do a PowerCLI script that add a host license in the connect VC and put this in one host, the list of license key and hosts are in the file lic.txt and hosts.txt. This the code:
$MyVC=Connect-VIServer -Server 192.168.100.10 -User administrator@vsphere.local -Password *************
$LicenseManager = get-view ($MyVC.ExtensionData.content.LicenseManager)
$LicKey = Get-Content C:\Script\lic.txt
$ESXiHost = Get-Content C:\Script\hosts.txt
foreach($row in $ESXiHost) {
$LicenseManager.AddLicense($LicKey,$null)
Set-VMHost -VMHost $ESXiHost -LicenseKey $LicKey
}
Disconnect-VIServer -Server * -Force -Confirm:$false
All works fine but I need to change the label on column "License" from "License 1" to "host_name", there is some way to do this?
Domesenn
Afaik, that is a private API, so you can't.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Afaik, that is a private API, so you can't.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
:smileycry::smileycry::smileycry:
Many thanks LucD
Hi LucD,
Can it be added to an future release of PowerCLI, as it would make it easier to automatically assign licenses, based on the the Label
br
A.Mikkelsen
I'm not working for VMware and have nothing to say on roadmaps and future features.
But there is the PowerCLI Ideas website, and I noticed you already submitted the idea.
You have my vote :smileygrin:
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference