Along with the release of vSphere 5.5 U1 and the VSAN general availability, there is some other pretty exciting news that might risk getting overlooked: The release of PowerCLI 5.5 R2.
Why is that so exciting for an availability guy? Because for the first time you can now use PowerCLI with the SRM API directly! Check it out in the PCLI release notes.
You can now manage the vCenter Site Recovery Manager Public API through the <code>Connect-SRMServer</code> and <code>Disconnect-SRMServer</code> cmdlets.
Great, what does *that* mean? Well my friend Alan Renouf who now manages the product informs me that it means:
Full management of the vCenter SRM Public API: Using the Connect-SRMServer and Disconnect-SRMServer you are now able to connect to vCenter SRM and access all public APIs available, use of the $global:DefaultSrmServers object properties and methods after connection allow for access to recovery group and protection group automation, see the built in help and examples for more information.
Now be aware that this does not mean we have a full and rich set of PowerCLI cmdlets for SRM, just that PowerCLI can now view the entire existing API that SRM presents. But for those of you who want to do things like running tests programmatically – here’s a much easier way than cracking out the java code!
Make sure you take a look at the PowerCLI User’s Guide and also examine the sample scripts for SRM. They sure make it easy to call API functions like ListProtection Groups, GetInfo, ProtectVMs, etc. The samples include handy things like:
- Connecting to an SRM server with PowerCLI
- Protecting a virtual machine
- Creating a report on protected virtual machines
- Creating a report of virtual machines associated with all protection groups
For more info stay tuned here as well as at the Official PowerCLI Blog where Alan and others will doubtless be providing more examples on use. You might want to check out the SRM API Documentation as well for the context of what exactly you are capable of doing with SRM via API/PowerCLI.