I am scripting the creation of a backup copy job to a target CloudConnect repository. The tenant I'm using has a Service Provider WAN Accelerator resource assigned to it.
The issue I'm hung up on is that I can't figure out how to populate the target accelerator (the one at the CloudConnect SP). Get-VBRWANAccelerator only returns the single local accelerator on the B&R server, as expected since the target WAN accelerator is normally greyed out and auto-populates in the GUI.
The problem is that the Add-VBRComputerBackupCopyJob cmdlet requires -something- as a -TargetAccelerator.
Code: Select all
$SourceWANAccelerator = Get-VBRWANAccelerator
Add-VBRComputerBackupCopyJob -SourceAccelerator <CWanAccelerator> -TargetAccelerator <CWanAccelerator> [-Name <string>]...
Code: Select all
$JobOptions = New-VBRJobOptions -ForBackupJob
$JobOptions.JobOptions.UseWan = 'True'
$CopyJob = Get-VBRJob -Name $CopyJobName
Set-VBRJobOptions -Job $CopyJob -Options $JobOptions
I found one of @Mildur 's suggestions from another thread and only the .FindSourceWanAccelerator() method returns a PS object for a CloudConnect copy job set up with WAN accel from the GUI.
Code: Select all
PS C:\Users\Administrator> $CopyJob = Get-VBRJob -Name $CopyJobName
PS C:\Users\Administrator> $CopyJob.FindTargetWanAccelerator()
PS C:\Users\Administrator> $CopyJob.FindSourceWanAccelerator()
Id : b7050fe9-7a98-4dbd-b7db-61729c2aca30
Name : LAB-WIN-SVR2016
Description : WAN Accelerator 01
HostId : 6745a759-2205-4cd2-b172-8ec8f7e60ef8
Options : Veeam.Backup.Core.CDomWaOptions