Connecting to SRM servers
Before you can manage SRM from PowerCLI, you have to connect to the SRM servers you want to manage. Because SRM fails over virtual machines from a protected site to a recovery site, both sites need a vCenter Server and an SRM server. So, if you want to manage both SRM servers, you will have to connect to each of them. After connecting to an SRM server, you can use the ExtensionData
property of the output of the Connect-SrmServer
cmdlet to access the SRM API.
The Connect-SrmServer
cmdlet establishes a connection to an SRM server. The syntax of the Connect-SrmServer
cmdlet is given here. The first parameter set is the default. You can use this parameter set if you have a connection to a vCenter Server that has an SRM server associated with it:
Connect-SrmServer [-User <String>] [-Password <SecureString>]
[-Port <Int32>] [-Protocol <String>] [-Credential <PSCredential>]
[-RemoteCredential <PSCredential>] [-RemoteUser <String...