Hi all,
i'm scripting to set up a new ESXi5...works fine so far, but i can't join the ESXi to a Windows ActiveDirectory 2008 Domain.
This is what i'm trying:
get-vmHost ESXi01 | Get-VMHostAuthentication | Set-VMHostAuthentication -Domain $domain -JoinDomain:$true -Credential $global:vCred -Force:$true -Confirm:$false
and this is the output:
Set-VMHostAuthentication : Der Parametersatz kann mit den angegebenen benannten Parametern nicht aufgelöst werden.
Bei C:\Users\LB025304\Documents\PowerShell\Configure-ESXi_LEW_Trunk.ps1:998 Zeichen:70
+ $global:vmHost | Get-VMHostAuthentication | Set-VMHostAuthentication <<<< -Domain $domain -JoinDomain:$true -Credent
ial $global:vCred -Force:$true -Confirm:$false
+ CategoryInfo : InvalidArgument: (:) [Set-VMHostAuthentication], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.SetVMHostAuthenticat
ion
I know this worked sometimes, but doesn't anymore...
Any suggestions?
Thanks!
Hi,
This particular error is caused by the Force parameter. It's applicable only for LeaveDomain parameterSet but in this case you are in the JoinDomain parameterSet. So just remove the
-Force:$true
and try the command again.
Regards,
Yasen
I am not too sure what might have gone wrong here considering you had it worked in the past. I can only recommend debugging.
Have a look at this link for comparison: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Set-VMHostAuthentication.html
Is the user mentioned in $global:vcred still authorized to join other objects to domain ?
Greg
yes, this account is member of Domain-Admins...
Hi,
This particular error is caused by the Force parameter. It's applicable only for LeaveDomain parameterSet but in this case you are in the JoinDomain parameterSet. So just remove the
-Force:$true
and try the command again.
Regards,
Yasen
Thanks, Yasen.
That's it!