Get list of VMs out of Cloud backup job

PowerShell script exchange

Get list of VMs out of Cloud backup job

Veeam Logoby Maieu_san » Fri May 09, 2014 10:13 am

Hi,

I'm trying to list all VMs that are under backup, in the Cloud, using this script:
foreach($job in Get-VBRJob) { Write-Host "Job:", $job.Name; $job.GetObjectsInJob() | foreach { $_.Location } }

For a normal job (non cloud) this works, because you specify the VMs as object in the job.
For a cloud job, you specify the organization, and the result is, as expected, the specified organization with the query specified.
But what I would like is to get a list of all the VMs under the organization.

Is there any way to fetch the data I require?

Thanks in advance!
Maieu_san
Service Provider
 
Posts: 19
Liked: 2 times
Joined: Wed Oct 05, 2011 6:28 am
Full Name: Steven Maieu

Re: Get list of VMs out of Cloud backup job

Veeam Logoby v.Eremin » Mon May 12, 2014 9:02 am

If you're using container, instead of individual objects, then, the querying process should be conducted in two steps.

1) Get the job object, using Get-VBRJobObject commadlet (Organization, in your case).
2) Get VMs that are located within the given organization, using Find-VBRvCloudEntity commandlet.

Thanks.
v.Eremin
Veeam Software
 
Posts: 13290
Liked: 973 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin


Return to PowerShell



Who is online

Users browsing this forum: No registered users and 10 guests