Adding Custom Scripts to Veeam Disaster Recovery Orchestrator

If you have a PowerShell script that you want to run as part of the recovery process, you can upload your script into Orchestrator, and it will be executed when you run your plan.

The script can run on a Veeam Backup & Replication server, on the Orchestrator server or inside each machine included in the plan. You can customize settings required for script execution and pass various parameters into the script: credentials, runtime variables (such as vm_name or plan_state) and any other custom parameters you require. Script output will be captured in plan details in the Orchestrator UI, and in Plan Execution and DataLab Test reports.


Due to Microsoft Azure limitations, script output for cloud plans is limited to 4096 bytes.

This section will demonstrate how to upload a simple example script into Orchestrator.






try {    

   $fileName = "HelloWorld.txt"

   "Hello World!" | Out-File -FilePath "$folderName\$fileName"

   Write-Host "File $fileName was created in folder $folderName"


catch {

   Write-Error "Failed to create file in folder $folderName"

   Write-Error $_.Exception.Message



If you want to create a custom script and execute it when running an orchestration plan, you must take into account the following considerations.

  • The script you want to use must be a PowerShell script. Orchestrator 6.0 supports PowerShell scripts only.
  • To allow the script to run inside a machine guest OS, it is required that you have Microsoft PowerShell 3.0 and .Net Framework 4.0 installed on each machine for which you enable the custom script step.
  • To allow the script to run on a Veeam Backup & Replication server, no additional software is required.

In This Section