All batch files or commands for custom recovery steps that you add to a recovery plan must meet certain requirements.

When you create a command step to add to a recovery plan, make sure that it takes into account the environment in which it must run. Errors in a command step affect the integrity of a recovery plan. Test the command on Site Recovery Manager Server on the recovery site before you add it to the plan.

You must start the Windows command shell using its full path on the local host. For example, to run a script located in c:\alarmscript.bat, use the following command line:

c:\windows\system32\cmd.exe /c c:\alarmscript.bat

You must install batch files and commands on the Site Recovery Manager Server at the recovery site.

Batch files and commands must finish within 300 seconds. Otherwise, the recovery plan terminates with an error. To change this limit, see Change Recovery Settings.

Batch files or commands that produce output that contains characters with ASCII values greater than 127 must use UTF-8 encoding. Site Recovery Manager records only the final 4KB of script output in log files and in the recovery history. Scripts that produce more output should redirect the output to a file rather than sending it to the standard output to be logged.