Automation

 View Only
Expand all | Collapse all

IMM Ip Address through PowerCLI

  • 1.  IMM Ip Address through PowerCLI

    Posted Nov 03, 2020 03:31 PM

    hello

    I am exeucting following line from https://www.altaro.com/vmware/esxi-ilo-idrac-powercli/

    Get-VMHostWSManInstance –Vmhost (Get-VMhost ESX01.tglab.lcl) –IgnoreCertFailures –Class OMC_IPMIIPProtocolEndpoint

    but I am getting winrm error message

    Get-WSManInstance : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the

    logs and documentation for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the

    destination to analyze and configure the WinRM service: "winrm quickconfig".

    At line:3 char:1

    + Get-WSManInstance -ConnectionURI ("https`://" + $h.Name + "/wsman") - ...

    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : InvalidOperation: (:) [Get-WSManInstance], COMException

        + FullyQualifiedErrorId : Exception,Microsoft.WSMan.Management.GetWSManInstanceCommand

    i can able to see wsman is enabled and service is started in esxi what could be issue? 



  • 2.  RE: IMM Ip Address through PowerCLI

    Posted Nov 03, 2020 05:01 PM

    What does a Test-NetConnection say?

    Test-NetConnection -ComputerName <your-esx-node> -Port 443



  • 3.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 06:31 AM

    RemotePort             : 443

    InterfaceAlias         :

    SourceAddress          :

    PingSucceeded          : True

    PingReplyDetails (RTT) : 0 ms

    TcpTestSucceeded       : True

    no issue for 443 port, I am thinking something realted to basic authentication ?



  • 4.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 07:04 AM

    Could be, try adding the Verbose switch on the Get-WSManInstance cmdlet.



  • 5.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 07:18 AM

    below is verbose log not much useful, I am getting two error message, when I run locally I can get remote IP and wbem and wsman all are running fine at esxi level. is this something to do with any ?pam authentication ? any bug in 6.7?

    VERBOSE: 11/4/2020 12:46:22 PM Get-View Finished execution

    Get-WSManInstance : The client cannot connect to the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation
    for the WS-Management service running on the destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM
    service: "winrm quickconfig". get-vmhostwsinstance.ps1:44 char:9
    +         Get-WSManInstance -Authentication basic -ConnectionURI $uri - ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Get-WSManInstance], COMException
        + FullyQualifiedErrorId : Exception,Microsoft.WSMan.Management.GetWSManInstanceCommand

    Get-WSManInstance : <f:WSManFault xmlns:f="http://schemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2150858770" Machine="xxxxxxxxxxxx.iom.schneider-electric.com"><f:Message>The client cannot connect to
    the destination specified in the request. Verify that the service on the destination is running and is accepting requests. Consult the logs and documentation for the WS-Management service running on the
    destination, most commonly IIS or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configure the WinRM service: "winrm quickconfig".
    </f:Message></f:WSManFault>
    ript\get-vmhostwsinstance.ps1:44 char:9
    +         Get-WSManInstance -Authentication basic -ConnectionURI $uri - ...
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (http://schema.o...rotocolEndpoint:Uri) [Get-WSManInstance], InvalidOperationException
        + FullyQualifiedErrorId : WsManError,Microsoft.WSMan.Management.GetWSManInstanceCommand



  • 6.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 07:46 AM

    I was able to get the same errors you are getting when I stop and disable the CIM service.

    To fix it, I did the following

    - connect to the ESXi node

    Connect-VIServer -Server <esx-name>

    - enable the CIM service

    $esxcli = Get-EsxCli -VMHost <esx-name> -V2

    $esxcli.system.wbem.set.invoke(@{enable=$true})

    - start the CIM service

    Get-VMHostService -VMHost <esx-name> |

    where{$_.Key -eq 'sfcbd-watchdog'} |

    Start-VMHostService -Confirm:$false


    After that, I was able to call the function. For example

    Get-VMHostWSManInstance -VMHost (Get-VMHost -Name homelab*) -class OMC_Card -ignoreCertFailures


  • 7.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 08:08 AM

    unfortunately I am facing same error with your same code,  as told before wbem and sfcbd-watchdog enabled and restarted

    I desperately looking for solution because I cannot find anywhere solution to my question, please help

    any special winrm configuration require to connect Esxi?



  • 8.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 08:20 AM

    When you go to the Web Client, select the ESXi node, and then look at Monitor - Hardware Health, do you see information in there?

    Btw, which vSphere/ESXi version are you running?



  • 9.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 08:45 AM

    Yes I can able to see sensor health checks

    esxi version 6.7 u3

    I guess something related to basic authentication or winrm configuration but could not able to idenfity what could abe the issue

    here is my winrm configuration

    Config
        MaxEnvelopeSizekb = 500
        MaxTimeoutms = 60000
        MaxBatchItems = 32000
        MaxProviderRequests = 4294967295
        Client
            NetworkDelayms = 5000
            URLPrefix = wsman
            AllowUnencrypted = true
            Auth
                Basic = true
                Digest = true
                Kerberos = true
                Negotiate = true
                Certificate = true
                CredSSP = false
            DefaultPorts
                HTTP = 5985
                HTTPS = 5986
            TrustedHosts = *
        Service
            RootSDDL =xxxxxxx
            MaxConcurrentOperations = 4294967295
            MaxConcurrentOperationsPerUser = 1500
            EnumerationTimeoutms = 240000
            MaxConnections = 300
            MaxPacketRetrievalTimeSeconds = 120
            AllowUnencrypted = true
            Auth
                Basic = true
                Kerberos = true
                Negotiate = true
                Certificate = false
                CredSSP = false
                CbtHardeningLevel = Relaxed
            DefaultPorts
                HTTP = 5985
                HTTPS = 5986
            IPv4Filter = *
            IPv6Filter = *
            EnableCompatibilityHttpListener = false
            EnableCompatibilityHttpsListener = false
            CertificateThumbprint
            AllowRemoteAccess = true
        Winrs
            AllowRemoteShellAccess = true
            IdleTimeout = 7200000
            MaxConcurrentUsers = 2147483647
            MaxShellRunTime = 2147483647
            MaxProcessesPerShell = 2147483647
            MaxMemoryPerShellMB = 2147483647
            MaxShellsPerUser = 2147483647

    C:\Windows\System32>



  • 10.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 09:41 AM

    I'm afraid I'm out of ideas.
    Perhaps you should ask on the site where you got the script from.



  • 11.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 10:09 AM

    Do you have any script to get remote IMM ip address using wsman?



  • 12.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 10:49 AM

    LucD

    I created https listerner but now I am getting different error message acces denied, I guess you mentioned one of the site "\" causing issue but didn't understand how to eliminiate this access denied problem

    Get-WSManInstance : Access is denied.

    At line:1 char:17

    + ...             Get-WSManInstance -Authentication basic -ConnectionURI $u ...

    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

        + CategoryInfo          : InvalidOperation: (:) [Get-WSManInstance], UnauthorizedAccessException

        + FullyQualifiedErrorId : Exception,Microsoft.WSMan.Management.GetWSManInstanceCommand



  • 13.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 11:38 AM

    What post are you referring to?



  • 14.  RE: IMM Ip Address through PowerCLI
    Best Answer

    Posted Nov 04, 2020 12:43 PM

    Finally I found its bug in 6.7 u3

    I  have 6.7 u3 environment and 6.5 Enviorment( we have lenovo/dell/Hp)

    When I run wsman connection from powerCLI its getting connected successfully for 6.5 environment irrespective of any hardware vendor

    but when I run wsman connection against to 6.7 its always failing, I guess something is changed in 6.7.



  • 15.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 12:51 PM

    It might be the same as this problem OMIVV 5 not connecting to ESXi 6.7 U3 - Dell Community



  • 16.  RE: IMM Ip Address through PowerCLI

    Posted Nov 04, 2020 01:56 PM

    exactly I was reading same document, but replaced dell customised VIB from dell but I have Lenovo but issue with VMware they have to replace some VIB's