6.5.1

Table Of Contents
3 Create a new LicenseData object and a LicenseKeyEntry object with associated type ID and
license key.
$licenseData = New-Object VMware.VimAutomation.License.Types.LicenseData
$licenseKeyEntry = New-Object Vmware.VimAutomation.License.Types.LicenseKeyEntry
$licenseKeyEntry.TypeId = "vmware-vsphere”
$licenseKeyEntry.LicenseKey = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
4 Associate the LicenseKeys attribute of the LicenseData object you created in step 3 with the
LicenseKeyEntry object.
$licenseData.LicenseKeys += $licenseKeyEntry
5 Update the license data for the data center with the LicenseData object and verify that the license is
associated with the host container.
$licenseDataManager.UpdateAssociatedLicenseData($hostContainer.Uid, $licenseData)
$licenseDataManager.QueryAssociatedLicenseData($hostContainer.Uid)
6 Provision one or more hosts with vSphere Auto Deploy and assign them to the data center or to the
cluster that you assigned the license data to.
7 You can use the vSphere Web Client to verify that the host is successfully assigned to the default
license XXXXX-XXXXX-XXXXX-XXXXX-XXXXX.
All hosts that you assigned to the data center are now licensed automatically.
Managing vSphere Auto Deploy with PowerCLI Cmdlets
You can manage vSphere Auto Deploy with PowerCLI cmdlets to create rules that associate hosts with
image profiles, host profiles, custom scripts and locations on the vCenter Server target. You can also
update hosts by testing rule compliance and repairing compliance issues.
vSphere Auto Deploy PowerCLI Cmdlet Overview
You specify the rules that assign image profiles and host profiles to hosts using a set of PowerCLI
cmdlets that are included in PowerCLI.
If you are new to PowerCLI, read the PowerCLI documentation and review Using vSphere Auto Deploy
Cmdlets. You can get help for any command at the PowerShell prompt.
n
Basic help: Get-Help cmdlet_name
n
Detailed help: Get-Help cmdlet_name -Detailed
Note When you run vSphere Auto Deploy cmdlets, provide all parameters on the command line when
you invoke the cmdlet. Supplying parameters in interactive mode is not recommended.
vSphere Installation and Setup
VMware, Inc. 127