I have to create some veeam backup jobs and I am using below script:
Code: Select all
$csv = import-csv "C:\temp\AssessMed.csv"
$entity = Get-VBRServer -Name "vcenter.local"
$repo = Get-VBRBackupRepository -ScaleOut
foreach ($line in $csv) {
Add-VBRViBackupJob -Name $line.name -Description $line.Description -BackupRepository $repo -Entity ($Entity | Find-VBRViEntity -name $csv.Entity)
}
JobName,Entity,Description
ASMD_PROD_VM1,VM1,'Domain Controller'
ASMD_PROD_VM1,VM2,'Terminal Server 4'
everything works fine except the script adds all VMs in both jobs. While I want job1 will have only object that is VM1 and job2 will have VM2 to process.
Thanks
Arun