Identify all VMs with a backup job

PowerShell script exchange

Identify all VMs with a backup job

Veeam Logoby Backerupper » Fri Oct 14, 2016 4:16 pm

Is it possible to identify all VMs within a backup job?
What if the job specifies a folder or datastore - is there any way to use PS (method or super secret code) to tell VBR to get the contents (VMs) in said folder/datastore?
Obviously when the job is started these values are gathered - are they exposed to us at all?

Thanks!
Backerupper
Enthusiast
 
Posts: 42
Liked: 10 times
Joined: Fri Dec 28, 2012 2:32 pm

Re: Identify all VMs with a backup job

Veeam Logoby Vitaliy S. » Mon Oct 17, 2016 1:00 pm

Hi,

When VM containers are used, backup job enumerates all objects at the beginning of a job run, so, basically, the list of backed up VMs will be the list of all VMs in the container. Can you please clarify a bit the scenario you're trying to archive?

Thanks!
Vitaliy S.
Veeam Software
 
Posts: 19562
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Identify all VMs with a backup job

Veeam Logoby Backerupper » Mon Oct 17, 2016 1:22 pm

Just trying to identify the VMs that would be backed up by a job that contains a container and not individual VMs.

Not a serious concern or anything, just wondering if it is possible.
Backerupper
Enthusiast
 
Posts: 42
Liked: 10 times
Joined: Fri Dec 28, 2012 2:32 pm

Re: Identify all VMs with a backup job

Veeam Logoby Vitaliy S. » Mon Oct 17, 2016 1:52 pm

Oh, got it. In this case either PowerCLI script should do the trick or one of the predefined reports in Veeam ONE > VMs Configuration
Vitaliy S.
Veeam Software
 
Posts: 19562
Liked: 1102 times
Joined: Mon Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov

Re: Identify all VMs with a backup job

Veeam Logoby v.Eremin » Mon Oct 17, 2016 2:27 pm 1 person likes this post

It seems to me that you might be interested to get information regarding which VMs have been protected and which VMs have been not. If so, take a look at this report, or its PS analogue. Thanks.
v.Eremin
Veeam Software
 
Posts: 13266
Liked: 969 times
Joined: Fri Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin

Re: Identify all VMs with a backup job

Veeam Logoby Backerupper » Tue Oct 18, 2016 3:59 pm

Thanks for the answers guys.

I was looking to gather the info via Veeam only (no powerCLI or third-party).

Just wanted to confirm that it wasn't possible.

Re existing scripts - I'm very familiar. I was looking to simply be able to query just a job (or multiple jobs) and determine what VMs would be included in the job.

Thanks again
Backerupper
Enthusiast
 
Posts: 42
Liked: 10 times
Joined: Fri Dec 28, 2012 2:32 pm

Re: Identify all VMs with a backup job

Veeam Logoby tsightler » Tue Oct 18, 2016 4:09 pm

Yeah, this is a pretty common request. It's exceptional difficult to figure out what VMs would be in this job if run right now based on the current selection of container objects. Sure, I could write code to parse out all VMs within the various container types (and there are a lot, folders, datastores, resource pools, tags, even vCenter), but then I'd also still have to deal with potential excludes (either by VM or potentially also by container). That's a lot of code to deal with something Veeam already obviously does during job start, and what if my logic doesn't exactly match the Veeam logic (for example with excludes, etc). It would be really nice if there was some function call to just return the VM objects that a job would process based on the current objects selected in the job. I'm sure I could poke at the functions and likely eventually figure it out, but a nice, standard way to do this would be really useful.
tsightler
Veeam Software
 
Posts: 4768
Liked: 1737 times
Joined: Fri Jun 05, 2009 12:57 pm
Full Name: Tom Sightler


Return to PowerShell



Who is online

Users browsing this forum: Yahoo [Bot] and 11 guests