VMware

Powershell: Query vcloud director (provider) and lookup vcenter vm

Hi!

I’m fairly new to powershell so apologies in advance for not using the right terminology.

I’m trying to automate some process with powershell that requires me to lookup vms from vcenter and query what tenant they belong to in vcloud-director. So far i tried matching on name but since vm names are not unique on the vcd-provider level its difficult to match them with great accuracy. I could lookup the resource-pool and match that to a org-vdc and do it that way, but are there smarter ways to do it?

I’ve found existing functions lookup up from vcd > vc, but not the other way around.

Is my google-fu letting me down? does anyone know is there’s a way? may-be lookup the vc-moref through a vcd cmdlet?

Any push in the right direction would greatly be appreciated!

Thanks!



View Reddit by zyxnlView Source

 

To see the full content, share this page by clicking one of the buttons below

Related Articles

One Comment

Leave a Reply