You can retrieve vSphere inventory objects from cloud resources by using the RelatedObject parameter of PowerCLI cmdlets. This interoperability expands your cloud administration, automation, reporting, and troubleshooting options.
You can use the RelatedObject parameter of PowerCLI cmdlets to retrieve vSphere inventory objects from VMware Cloud Director objects. Passing the retrieved objects to the cmdlets of the VMware.VimAutomation.Core and VMware.VimAutomation.Vds modules, extends your administration options.
Note: Use of the
VMware.VimAutomation.Core and
VMware.VimAutomation.Vds modules to modify the configuration of objects that are managed by
VMware Cloud Director might result in unpredictable behavior of the cloud environment.
Cloud Object | Retrieved vSphere Inventory Object | Sample Script for Retrieving the vSphere Inventory Object |
---|---|---|
ProviderVdc | Datastore | Get-ProviderVdc -Name 'MyProviderVdc' | Get-Datastore |
CIVM | VirtualMachine | Get-CIVM -Name 'MyCloudVM' | Get-VM |
NetworkPool | VDSwitch | Get-NetworkPool -Name 'MyNetworkPool' | Get-VDSwitch |
NetworkPool | VDPortgroup | Get-NetworkPool -Name 'MyNetworkPool' | Get-VDPortGroup |
ExternalNetwork | VDPortgroup | Get-ExternalNetwork -Name 'MyExternalNetwork' | Get-VDPortGroup |