I'm trying to write a script that lists all the VMs to be backed up with in a job so I can restart services in a pre-backup script. Our backups are 100% tag driven at this point so when I do
Get-VBRJob -Name $jobname | Get-VBRJobObject | select name
All I get at this point is the name of my VMware tag and some old data that is not used any more. Is there a way to recurse that tag to get a listing of the VMs?
-
- Veeam Vanguard
- Posts: 227
- Liked: 55 times
- Joined: Jan 13, 2011 5:42 pm
- Full Name: Jim Jones
- Location: Hurricane, WV
- Contact:
Recurse a tags based backup job to get a list of VMs in Job
Jim Jones, Sr. Product Infrastructure Architect @iland / @1111systems, Veeam Vanguard
-
- Veeam Software
- Posts: 712
- Liked: 168 times
- Joined: Nov 30, 2010 3:19 pm
- Full Name: Rick Vanover
- Location: Columbus, Ohio USA
- Contact:
Re: Recurse a tags based backup job to get a list of VMs in Job
Kudos Jim for being 100% tag-driven.
Curious if the tag result could be thru vSphere PowerCLI vs. the Veeam one cmdlet? (I'm no scripter, but I'm thinking which system "owns" the object - the tag)
Curious if the tag result could be thru vSphere PowerCLI vs. the Veeam one cmdlet? (I'm no scripter, but I'm thinking which system "owns" the object - the tag)
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Recurse a tags based backup job to get a list of VMs in Job
Use Find-VBRViEntity along with -Tags parameter; should be something you're after. More information can be found here. Thanks!
-
- Veeam Vanguard
- Posts: 227
- Liked: 55 times
- Joined: Jan 13, 2011 5:42 pm
- Full Name: Jim Jones
- Location: Hurricane, WV
- Contact:
Re: Recurse a tags based backup job to get a list of VMs in Job
@Rick The easiest version of this that I've been able to do is just that, query vSphere for it instead of Veeam. It actually looks like the Find-VBRViEntity -Tags option is trying to do just that, direct asking my VCSA for information based on the tag. What this doesn't do is give you a full listing of the VMs actively processed by the job, you have to know the tag name first.
Jim Jones, Sr. Product Infrastructure Architect @iland / @1111systems, Veeam Vanguard
Who is online
Users browsing this forum: No registered users and 18 guests