DDtAM
Contributor
Contributor

Convert esxcli system wbem get to PowerCLI command

Jump to solution

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....

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

Try like this

$esxName = 'MyEsx'

$esx = Get-VMHost -Name $esxName

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

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


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

View solution in original post

0 Kudos
1 Reply
LucD
Leadership
Leadership

Try like this

$esxName = 'MyEsx'

$esx = Get-VMHost -Name $esxName

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

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


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

View solution in original post

0 Kudos