I pre-create the computer object in active directory. I then log into the 5.5 ESXi free edition host using the .net client, from there I can successfully join the host to my domain.
But trying to do the same from PowerCLI when logged into the host as root I receive an error
Get-VMHost | Get-VMHostAuthentication | Set-VMHostAuthentication -Domain "domain.com" -Credential (Get-Credential) -JoinDomain
Set-VMHostAuthentication : 3/24/2014 4:16:15 PM Set-VMHostAuthentication
Current license or ESXi version prohibits execution of the requested operation.
At line:1 char:41
+ get-vmhost | Get-VMHostAuthentication | Set-VMHostAuthentication -Domain
" ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~
+ CategoryInfo : NotSpecified: (:) [Set-VMHostAuthentication], Re
strictedVersion
+ FullyQualifiedErrorId : ViCore_SystemManagementServiceImpl_JoinDomain_Vi
Error,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.SetVMHostAuthentication
---------------------------------------------------------------
I see that the error states "Current license or ESXi version prohibits execution of the requested operation." but it works from the .net client and I haven't read anything stating that you cannot add esxi free hosts to a domain. I have also used JoinDomain_task method and still receive the same error
$ADCreds = Get-Credential
$Domain = "Domain.com"
$AuthObj = Get-View -Id 'HostActiveDirectoryAuthentication-ha-ad-auth'
$AuthObj.JoinDomain_Task($Domain, $ADCreds.GetNetworkCredential().username, $ADCreds.GetNetworkCredential().password)