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.
$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"