Managing the vSphere Automation API with VMware PowerCLI

You can manage the vSphere Automation API with VMware PowerCLI by using the vSphere Automation SDK for PowerShell.

The vSphere Automation SDK is integrated in VMware PowerCLI, starting from version 12.4.0. The modules that contain the vSphere Automation SDK start with the VMware.vSphere.Sdk prefix.

The vSphere Automation SDK functions on a low level and communicates directly with the vSphere Automation API server. The results from the API operations are returned as PowerShell custom objects.

You can construct vSphere Automation SDK cmdlets by using the Initialize- and Invoke- cmdlet verbs in combination with the names of the API data structures or operations.

Figure 1. Constructing vSphere Automation SDK Cmdlets
A diagram shows how to construct vSphere Automation SDK cmdlets.
  • Use the Initialize- cmdlets to prepare the data structures, if any, for your API calls. These cmdlets function on the client side and do not communicate with the API server.

  • Use the Invoke- cmdlets to call the vSphere Automation API server and invoke the operations.

Get Help with the vSphere Automation SDK Cmdlets

To get help in PowerShell, use the Get-Help cmdlet in combination with a vSphere Automation SDK cmdlet name. Add the -Online parameter to the command and the system directs you to the vSphere Automation API reference website.

Get-Help Invoke-CreateVM -Online