PowerShell script exchange
Post Reply
Backerupper
Enthusiast
Posts: 47
Liked: 23 times
Joined: Dec 28, 2012 2:32 pm
Contact:

Identify all VMs with a backup job

Post by Backerupper » 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!

Vitaliy S.
Product Manager
Posts: 22858
Liked: 1538 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Identify all VMs with a backup job

Post by Vitaliy S. » 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!

Backerupper
Enthusiast
Posts: 47
Liked: 23 times
Joined: Dec 28, 2012 2:32 pm
Contact:

Re: Identify all VMs with a backup job

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

Vitaliy S.
Product Manager
Posts: 22858
Liked: 1538 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Identify all VMs with a backup job

Post by Vitaliy S. » 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

veremin
Product Manager
Posts: 16778
Liked: 1404 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Identify all VMs with a backup job

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

Backerupper
Enthusiast
Posts: 47
Liked: 23 times
Joined: Dec 28, 2012 2:32 pm
Contact:

Re: Identify all VMs with a backup job

Post by Backerupper » 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

tsightler
VP, Product Management
Posts: 5399
Liked: 2229 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Identify all VMs with a backup job

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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests