VMware Cloud Community
Bernhard1502
Contributor
Contributor
Jump to solution

Set-VMHostAuthentication

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!

0 Kudos
1 Solution

Accepted Solutions
ykalchev
VMware Employee
VMware Employee
Jump to solution

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

Yasen Kalchev, vSM Dev Team

View solution in original post

0 Kudos
5 Replies
onoski
Enthusiast
Enthusiast
Jump to solution

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

0 Kudos
Grzesiekk
Expert
Expert
Jump to solution

Is the user mentioned in $global:vcred still authorized to join other objects to domain ?

Greg

--- @blog https://grzegorzkulikowski.info
0 Kudos
Bernhard1502
Contributor
Contributor
Jump to solution

yes, this account is member of Domain-Admins...

0 Kudos
ykalchev
VMware Employee
VMware Employee
Jump to solution

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

Yasen Kalchev, vSM Dev Team
0 Kudos
Bernhard1502
Contributor
Contributor
Jump to solution

Thanks, Yasen.

That's it!

0 Kudos