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

Get Learning PowerCLI - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.