PowerShell script exchange
Post Reply
skest3qc
Novice
Posts: 6
Liked: never
Joined: Jul 08, 2015 7:05 am
Full Name: SK
Contact:

Get VMs from Backup Copy Job

Post by skest3qc »

Hi,

i have a Veeam V10 copy job and the copy job has objects of backup jobs inside

I want to get the objects (job names) of the backup copy job
I tried the following:
$Job = Get-VBRJob -Name "copyjob"
$Job.getObjectsInJob() but this returns nothing.

Any idea how to get the objects (jobs) from a backup copy job?

Thanks
oleg.feoktistov
Veeam Software
Posts: 1912
Liked: 635 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get VMs from Backup Copy Job

Post by oleg.feoktistov » 2 people like this post

Hi,

If you happened to add jobs as includes to a backup copy job (either in mirror or periodic mode), it's rather linked jobs you are looking for
as included jobs are not reflected as job objects.
For periodic backup copy:

Code: Select all

$job = Get-VBRJob -Name 'CopyJob'
$job.LinkedJobIds
For mirror backup copy:

Code: Select all

$job = Get-VBRJob -Name 'CopyJob'
$workerJobs = $jobs.GetWorkerJobs() 
foreach ($workerJob in $workerJobs) {
  $workerJob.LinkedJobIds
}
Thanks!
skest3qc
Novice
Posts: 6
Liked: never
Joined: Jul 08, 2015 7:05 am
Full Name: SK
Contact:

Re: Get VMs from Backup Copy Job

Post by skest3qc »

Thanks it was mirror backup copy.
Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests