VMware Cloud Community
Zsoldier
Expert
Expert
Jump to solution

Get-VMHostAuthentication

I'm guessing this is a bug, but has anyone else noticed that the Get-VMHostAuthentication cmdlet requires an ESX host to be in 'Connected' status.  'Maintenance' is not a valid status for it.  I'm assuming there is a reason for this? 

As part of my installation process, I have a script joining the system to the domain (among several other things) and would rather not take the host out of maintenance, until I've finished configuration.

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
0 Kudos
1 Solution

Accepted Solutions
alanrenouf
VMware Employee
VMware Employee
Jump to solution

Thanks guys, we will take a look at this for a future version

Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com

View solution in original post

0 Kudos
6 Replies
Zsoldier
Expert
Expert
Jump to solution

To clarify, I'm running vCenter 4.1 U1 w/ ESXi 4.1 U2 hosts currently.

Maybe the hosts aren't reflecting their connection state correctly?

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
0 Kudos
LucD
Leadership
Leadership
Jump to solution

I do get the following error when I do a Get-VMHost Authentication on a vCenter 5 with an ESX 4.1U1 that is in maintenance mode.

Get-VMHostAuthentication : 13-03-2012 07:13:50    Get-VMHostAuthentication        The host must be in the following state: Connected.

This works from the vSphere Client and the JoinDomain_Task method, so I suspect this is an obsolete requirement.

As a bypass you could use the script from my Script vSphere 4.1 AD Authentication post.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
alanrenouf
VMware Employee
VMware Employee
Jump to solution

Thanks guys, we will take a look at this for a future version

Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com
0 Kudos
Zsoldier
Expert
Expert
Jump to solution

I bypassed it by simply doing the domain join as a first step rather than a last step, changing it to connect status and different placement in vCenter.

Then just placing it back into maintenance.

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
0 Kudos
Zsoldier
Expert
Expert
Jump to solution

Thanks Alan.

Chris Nakagaki (中垣浩一)
Blog: https://tech.zsoldier.com
Twitter: @zsoldier
0 Kudos
wilber822
Enthusiast
Enthusiast
Jump to solution

I got same error when retrieve authentication from ESXi5.0 U1 in vCenter 5.0 with PowerCLI 5.0.

Error message below for your reference.

Get-VMHostAuthentication : 7/24/2012 5:43:06 PM    Get-VMHostAuthentication        The host must be in the following st
ate: Connected.
At line:1 char:25
+ Get-VMHostAuthentication <<<<  -VMHost dcaesx57.amat.com
    + CategoryInfo          : InvalidOperation: (Maintenance:VMHostState) [Get-VMHostAuthentication], ViError
    + FullyQualifiedErrorId : Common_SharedParameterHelper_VerifyVmHostState_HostNotInState,VMware.VimAutomation.ViCor
   e.Cmdlets.Commands.Host.GetVMHostAuthentication
https://www.zhengwu.org
0 Kudos