You can access the vSphere Replication API with VMware PowerCLI by using the vSphere Replication SDK for PowerShell.

How Does the vSphere Replication SDK for PowerShell Work

Starting from VMware PowerCLI 13.1.0, you can use the vSphere Replication SDK for PowerShell to communicate with all available vSphere Replication REST APIs.

The VMware.Sdk.Vr module contains automatically-generated SDK cmdlets that bind directly to the vSphere Replication REST APIs. The module functions on a low level and communicates directly with the vSphere Replication API server.

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

Figure 1. Constructing vSphere Replication SDK Cmdlets

You construct vSphere Replication SDK Cmdlets by using the Invoke and Initialize cmdlet prefixes and adding an API data structure or operation.
  • Use 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 vSphere Replication API server.

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