When I'm running the AD Authentication script from LucD I'm getting the following error:
==================================================
[[vSphere PowerCLI] C:\> Set-VMHostADDomain -VMHost <FQDN> -ADJoin:$true -Credential $cred
Set-VMHostADDomain : Cannot process argument transformation on parameter 'VMHos
t'. Cannot convert the "<FQDN>" value of type "System
.String" to type "VMware.VimAutomation.ViCore.Impl.V1.Inventory.VMHostImpl[]".
At line:1 char:48
+ Set-VMHostADDomain -VMHost <<<< FQDN -ADJoin:$true -Credential $cred
+ CategoryInfo : InvalidData: (:) [Set-VMHostADDomain], Parameter
Bindin...mationException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Set-VMHostADDomain
==================================================
I have no clue what the problem could be...:smileyconfused:
The host is resolveable, the fqdn is correct, the script is well integrated in the powershell profile...
It's looking for a VMHost object and not a system string.
Set-VMHostADDomain -VMHost (Get-VMHost HostName) -ADJoin:$true -Credential $cred
Thanks! It works.