I have a highly tailored job (I'll call it job A). Somehow the list of VMs is not correct (clerical errors I'm guessing). the list of VMs I need for the job exists in job B. However because of all the settings I've configured on job A, I would prefer to copy the list of VMs of job B to it, rather than clone job B and reconfigure all of the job settings. So let's say the following:
JobA contains:
Server1
Server2
Server4
JobB contains the list of VMs I want to be included in JobA:
Server2
Server6
Server7
I am having trouble with the syntax, or am not providing what the cmdlets are looking for. I have tried a few variants of the following:
Code: Select all
get-vbrjobobject -Job "JobB" | Add-VBRViJobObject -job "JobA" -Entities $_ -Force
Code: Select all
get-vbrjobobject -Job "JobB" | foreach-object {Add-VBRViJobObject -job "JobA" -Entities $_}
Code: Select all
get-vbrjobobject -Job "JobB" | Select-Object Name | ForEach-Object {find-vbrvientity -name $_ | Add-VBRViJobObject -Job "JobA" -Entities $_}
Code: Select all
get-vbrjobobject -Job "App Servers_Daily" | Select-Object Name -OutVariable vms
Add-VBRViJobObject -Job "App Servers_Monthly" -Entities $vms
Code: Select all
$servers=get-vbrserver -name *
Find-VBRViEntity -server $servers -VMsAndTemplates | select Name
ForEach-Object {Add-VBRViJobObject -Job "JobA" -Entities $_}
Does anyone have any suggestions for this?