I'm currently working on a script to edit the testscripts of a Linked Job of a ShureBackup job via Powershell, but I'm not really successful.
Here is a small script that should add a Linked Job to the exsisting ShureBackup job "SHURETEST" but instead of adding, it delets all other Linked Jobs and creates the Linked Job with the testscript "HTTP Port".
The Veeam documentation isnt really clear and has a lot of mistakes that makes it hard to understand.
Does somebody know what I'm doing wrong or is there a better way to do it?
The Goal is to manage a lot of Shurebackup Jobs and Linked Jobs in the Future with costum scripts.
The manual way takes to long and is a lot of work in our envoirment so it would be nice if I can do all of the work with just a few scripts.
Here is the Veeam Documentation:
https://helpcenter.veeam.com/docs/backu ... ml?ver=120
Here is my script.
Code: Select all
$nametestscript = "HTTP Port"
$Port = "%vm_ip% 80"
$namelinkedjob = "LINKED JOB"
$job = Get-VBRJob -Name $namelinkedjob
$nameshurebackupjob = "SHURETEST"
$surejob = Get-VBRSureBackupJob -Name $nameshurebackupjob
$script = New-VBRSureBackupTestScript -Name $nametestscript -Path "C:\Program Files\Veeam\Backup and Replication\Backup\Veeam.Backup.ConnectionTester.exe" -Argument $Port
$Test = New-VBRSureBackupLinkedJob -Job $job -TestScript $script
Set-VBRSureBackupJob -Job $surejob -LinkedJob $Test