Managing SRM advanced configurations
In this section, we will discuss how to manage SRM through APIs. To manage a SRM server, we first need to connect to vCenter Server. Once we are connected to vCenter Server, we can connect to the SRM server using the following cmdlet:
PS C:\ $SrmServer = Connect-SrmServer
To access the SRM APIs, we can use the following command:
PS C:\ $SrmApi = $SrmServer.ExtensionData PS C:\ > $SrmApi |FL Content : VMware.VimAutomation.Srm.Views.SrmServiceInstanceContent Recovery : VMware.VimAutomation.Srm.Views.SrmRecovery Protection : VMware.VimAutomation.Srm.Views.SrmProtection MoRef : SrmServiceInstance-SrmServiceInstance
As you can see from the preceding example, the SRM APIs are divided into three groups: Content
, Recovery
, and Protection
.
To check what is available under Protection, we can use the following command:
PS C:\Users\administrator.SPWSVCD1> $SrmApi.Protection | Get-Member | Select Name Name ---- ...