You can access the Site Recovery Manager (SRM) API with VMware PowerCLI by using the Site Recovery Manager SDK for PowerShell.

How Does the Site Recovery Manager SDK for PowerShell Work

Starting from VMware PowerCLI 13.1.0, you can use the Site Recovery Manager SDK for PowerShell to communicate with the Site Recovery Manager (SRM) REST APIs.

The VMware.Sdk.Srm module contains automatically-generated SDK cmdlets that bind directly to the Site Recovery Manager (SRM) REST APIs. The module functions on a low level and communicates directly with the Site Recovery Manager (SRM) API server.

You can construct Site Recovery Manager SDK cmdlets by using the Initialize- and Invoke- cmdlet verbs in combination with the names of the Site Recovery Manager (SRM) API data structures or operations.

Figure 1. Constructing Site Recovery Manager SDK Cmdlets

You construct Site Recovery Manager 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 Site Recovery Manager (SRM) API server.

  • Use Invoke- cmdlets to call the Site Recovery Manager (SRM) API server and invoke the operations.