Automation

 View Only
Expand all | Collapse all

Convert esxcli system wbem get to PowerCLI command

  • 1.  Convert esxcli system wbem get to PowerCLI command

    Posted Nov 15, 2017 03:05 PM

    would like to get the output from the esxcli command at a PowerCLI prompt

    From powerShell Prompts

    connect-viserver ESXi1

    Get-VMHost

    $esxcli = Get-EsxCli -v2

    $esxcli.system.wbem.get

    That's about what I have right now....

    Once I figure this out.... remote ping of splunk servers...

    Thank you....



  • 2.  RE: Convert esxcli system wbem get to PowerCLI command
    Best Answer

    Posted Nov 15, 2017 03:12 PM

    Try like this

    $esxName = 'MyEsx'

    $esx = Get-VMHost -Name $esxName

    $esxcli = Get-EsxCli -VMHost $esx -v2

    $esxcli.system.wbem.get.Invoke()