Using the vCloud Director API with Get-CIView
While writing this book, there is no Remove-CIVM
cmdlet available in PowerCLI. To remove a vCloud Director or a vCloud Air virtual machine, or do anything else in vCloud Director or vCloud Air for which there is no PowerCLI cmdlet, you will have to use the vCloud API. PowerCLI provides us the Get-CIView
cmdlet that gives access to the cloud view objects of the vCloud API. You can also use the ExtensionData
property of the vCloud objects, to access the vCloud API, just like you can do with vSphere objects to access the vSphere API. The syntax of the Get-CIView
cmdlet is as follows. The first parameter set is to retrieve cloud view objects from a cloud object:
Get-CIView [-CIObject] <CIObject[]> [-Server <CIServer[]>]
[<CommonParameters>]
The -CIObject
parameter is required.
The second parameter set is to retrieve cloud view objects by ID:
Get-CIView -Id <String[]> [-ViewLevel <CIViewLevel>]
[-Server <CIServer...