Hi All,
I want a query which i can use to run on vCenter Host to get the IP Address of the vm-ID. Can i get it since i want to add it in my automation workflow.
i think there should be some simple powerCLI command which i can use.
Hi orwinlopes
This oneliner should do your work:)
Get-VM | Select Name,ID, @{Name="IP";Expression={@($_.Guest.IPAddress[0])}} | Where {$_.Id -Like "*113805"}
Just replace the "113805" with your ID but leave the asterisk.
If you need multiple IP-Addresses you can change the index of $_.Guest.IPAddress[0]
Tobi
Hi Butchi,
Thanks for your prompt reply.Seems like a powershell query to me...my vCenter Host does not run on Windows..
Orwin
Hi Orwin
Sorry I didn't know you've got a vCenter Appliance. You wrote PowerCLI on the first Post so I assumed you got a vCenter running on Windows.
Buchti
Orwin PowerCLI is VMware's version of PowerShell.
I can perfectly run PowerCLI (Shell) commands against my vCenter appliance in 5.5.
Kim