Help Center
Choose product document...
Veeam Availability Orchestrator 2.0
User Guide

Script Example

Imagine you have a PowerShell script that you want to run as part of failover or restore. You can upload your script into VAO, and it will be automatically executed when you run your plan.

The script can execute on the Veeam Backup & Replication server or inside each VM, and you can pass parameters into the script including credentials, runtime variables (such as vm_name or plan_state), and any custom parameters you require. Script output will be captured in plan details in the VAO UI, and in Plan Execution and DataLab Test reports.

The following sections will demonstrate how to upload the simple example script below into VAO.






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


Veeam Large Logo

User Guide

Deployment Guide

Group Management Guide

REST API Reference