You can navigate the vSphere Replication SDK for PowerShell by using the VMware Developer website, and the Get-Help, Get-Command, and Get-VrOperation cmdlets.
To use the vSphere Replication SDK for PowerShell effectively, you must be familiar with the vSphere Replication API reference documentation
.
How to Find a vSphere Replication Cmdlet
-
In your browser, navigate the vSphere Replication API reference documentation.
The vSphere Replication API Reference on VMware Developer features ready-to-use vSphere Replication 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.Vr
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-VrOperation with the Method and Path parameters.
For example:
Get-VrOperation -Method GET -Path '/replication-servers'
The command returns an object with the operation details.
Name : GetAllVrServers CommandInfo : Invoke-VrGetAllVrServers ApiName : ServerApi Path : /replication-servers Tags : {server} RelatedCommandInfos : {} Method : GET Parameters : {filterProperty, filter, sortBy, orderBy...}
The cmdlet name is listed in the CommandInfo property.
How to Get Information About a Cmdlet
To get information about a vSphere Replication cmdlet, run Get-Help with the cmdlet name. For example:
Get-Help Invoke-VrConfigureReplication -full