PowerShell script exchange
Post Reply
Obie
Novice
Posts: 4
Liked: never
Joined: Mar 21, 2023 12:35 pm
Contact:

List vm from backup job with list of exclusion

Post by Obie »

Hi,
I try to get the list from a veeam backup job with this :

$Job = Get-VBRJob -name "MY_JOB"
$Objects = $Job | Get-VBRJobObject
$Objects.name

In my veeam job I use the inclusion of a vCenter Datacenter. In the exclusion I use Tags on vm. When I try to list with powershell I would like to obtain a list of vm dynamically processed. Instead of that I get the list of tag ... Do you know a way to have these informations ?

Thanks for your help !
Mildur
Product Manager
Posts: 8735
Liked: 2296 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: List vm from backup job with list of exclusion

Post by Mildur »

Hi Obie

I'm not sure that this is possible in Veeam. I couldn't find a way.
You may query the inclusion/exclusion tags with powershell and then use PowerCLI to get all VMs assigned to those tags.

Let's see of one of my colleagues has another idea.

Best,
Fabian
Product Management Analyst @ Veeam Software
david.domask
Veeam Software
Posts: 1226
Liked: 323 times
Joined: Jun 28, 2016 12:12 pm
Contact:

Re: List vm from backup job with list of exclusion

Post by david.domask »

Hi,

It's not possible to get the child objects of hierarchy objects like Tags at the moment with Get-VBRJobObject.

You can pass the returned tag name to Find-VBRViEntity with the -Tags parameter, and I believe it should now return the VMs with such tags along with the tag itself.
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests