Adding Custom Scripts to Veeam Availability Orchestrator
Imagine you have a PowerShell script that you want to run as part of the recovery process. You can upload your script into VAO, and it will be executed when you run your plan.
The script can run on a Veeam Backup & Replication server, on the VAO server or inside each VM 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 VAO UI, and in Plan Execution and DataLab Test reports.
This section will demonstrate how to upload a simple example script into VAO.
$fileName = "HelloWorld.txt"
"Hello World!" | Out-File -FilePath "$folderName\$fileName"
Write-Host "File $fileName was created in folder $folderName"
Write-Error "Failed to create file in folder $folderName"
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. VAO 4.0 supports PowerShell scripts only.
- To allow the script to run inside a VM guest OS, it is required that you have Microsoft PowerShell 3.0 and .Net Framework 4.0 installed on each VM 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