PowerShell script exchange
Post Reply
Service Provider
Posts: 19
Liked: 2 times
Joined: Oct 05, 2011 6:28 am
Full Name: Steven Maieu

Get list of VMs out of Cloud backup job

Post by Maieu_san » May 09, 2014 10:13 am


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!

Product Manager
Posts: 16232
Liked: 1325 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Get list of VMs out of Cloud backup job

Post by v.eremin » 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.


Post Reply

Who is online

Users browsing this forum: Baidu [Spider] and 2 guests