6 Replies Latest reply on Jul 24, 2012 5:48 PM by wilber822

    Get-VMHostAuthentication

    Zsoldier Expert
    vExpert

      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.

        • 1. Re: Get-VMHostAuthentication
          Zsoldier Expert
          vExpert

          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?

          • 2. Re: Get-VMHostAuthentication
            LucD Guru
            vExpertUser ModeratorsCommunity Warriors

            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: http://lucd.info | Twitter: @LucD22 | PowerCLI Reference co-author: http://tinyurl.com/hkn4glz
            • 3. Re: Get-VMHostAuthentication
              alanrenouf Master
              VMware Employees

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

              • 4. Re: Get-VMHostAuthentication
                Zsoldier Expert
                vExpert

                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.

                • 5. Re: Get-VMHostAuthentication
                  Zsoldier Expert
                  vExpert

                  Thanks Alan.

                  • 6. Re: Get-VMHostAuthentication
                    wilber822 Enthusiast

                    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
                    http://www.zhengwu.org