VMware Cloud Community
spulv
Contributor
Contributor

Kick off SRM recovery plan from command line or Powershell script


I have SRM setup and some Recovery Plans made.  Is it possible to write a script to kick off a Recovery Plan without logging into vCenter to run the plan?  We have a central system that we run jobs from and it would be nice to put a recovery job in our central system that runs a script to kick off SRM recovery plans.  This would allow non-vmware people to just start the script and the recovery plan would kick off.  I am not finding much in the way for powercli commands to a start recovery plan, start reprotect, etc.  Please let me know if there are any reference guides for this.  This is different from adding scripts to my Recovery Plan.  I have custom scripts for steps with in a plan but I am actually looking for a way to script the kickoff of a recovery plan.  thanks for the help.

0 Kudos
4 Replies
frcouture
Enthusiast
Enthusiast

I am actually looking for this kind of informations too.  It would be really nice to be able to kick off a recovery plan by running a script.

0 Kudos
admin
Immortal
Immortal

PowerCLI and SRM - what you need to know! | VMware vSphere Blog - VMware Blogs

Try that out for now. You will still need to authenticate to VC but you can run the scripts from anywhere suitable for PowerCLI to run from.

cd.

0 Kudos
KutuImut
Contributor
Contributor

hmm,  i think what he mean is how to command vcenter to start execute recovery plan from command line, thats what i've been looking for too ( thats why i end up in this thread hehehehe )

0 Kudos
shivaprasada
VMware Employee
VMware Employee

If you can use java, there are lot of APIs exposed through the SRM SDK. For more info you can refer http://www.virtuallyghetto.com/2011/07/new-srm-5-apis.html

Through PowerCLI you will be able to only few things: you can refer the link vSphere 5.5 Documentation Center

0 Kudos