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.

  • 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
  • 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.