You can navigate the Site Recovery Manager SDK for PowerShell by using the VMware Developer website, and the Get-Help, Get-Command, and Get-SrmOperation cmdlets.

To use the Site Recovery Manager SDK for PowerShell effectively, you must be familiar with the VMware Site Recovery Manager REST API reference documentation.

How to Find a Site Recovery Manager SDK Cmdlet

There are several ways to find the Site Recovery Manager SDK cmdlets you need.
  • In your browser, navigate the Site Recovery Manager (SRM) API reference documentation.

    The Site Recovery Manager (SRM) API Reference on VMware Developer features ready-to-use Site Recovery Manager SDK code samples that you can paste directly into PowerShell. You can find a PowerCLI code snippet for each operation under PowerCLI Client SDK Example in the Code Samples section.

  • In PowerShell, run Get-Command -Module VMware.Sdk.Srm to list all available vSphere Replication cmdlets.

  • If you want to use information from the REST API specification to find a cmdlet, you can run Get-SrmOperation with the Method and Path parameters.

    For example:

    Get-SrmOperation -Method GET -Path '/pairings/{pairing_id}/protection-management/groups'

    The command returns an object with the operation details.

    Name                : GetAllGroups
    CommandInfo         : Invoke-SrmGetAllGroups
    ApiName             : ProtectionApi
    Path                : /pairings/{pairing_id}/protection-management/groups
    Tags                : {protection}
    RelatedCommandInfos : {}
    Method              : GET
    Parameters          : {pairingId, filterProperty, filter, sortBy...}

    The cmdlet name is listed in the CommandInfo property.

How to Get Information About a Cmdlet

To get information about a Site Recovery Manager SDK cmdlet, run Get-Help with the cmdlet name. For example:

Get-Help Invoke-SrmGetAllGroups -full