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

Identify all VMs with a backup job

Post by Backerupper »

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.
VP, Product Management
Posts: 27114
Liked: 2720 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. »

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: 24 times
Joined: Dec 28, 2012 2:32 pm
Contact:

Re: Identify all VMs with a backup job

Post by Backerupper »

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.
VP, Product Management
Posts: 27114
Liked: 2720 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. »

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: 20284
Liked: 2258 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Identify all VMs with a backup job

Post by veremin » 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: 24 times
Joined: Dec 28, 2012 2:32 pm
Contact:

Re: Identify all VMs with a backup job

Post by Backerupper »

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: 6011
Liked: 2843 times
Joined: Jun 05, 2009 12:57 pm
Full Name: Tom Sightler
Contact:

Re: Identify all VMs with a backup job

Post by tsightler »

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: Bing [Bot] and 17 guests