PowerShell script exchange
Post Reply
wane
Enthusiast
Posts: 39
Liked: 6 times
Joined: Jun 26, 2020 9:47 pm
Full Name: Walter Neu
Contact:

Get-VBRJobObject no result with -Name

Post by wane »

Crazy situation and I have no idea:

I have two VBR servers, test and production. On the test server I have a Powershell script that calls

Code: Select all

 $objects = Get-VBRJobObject -Job $job -Name $vms
Everything works fine:

Code: Select all

PS C:\Windows\system32> Get-VBRJobObject -Job wneu-t-win.eurodata.de -Name $vms

Name                      Type       ApproxSize       Location                 
----                      ----       ----------       --------                 
wneu-t-win.eurodata.de    Include    40 GB            vc4.edsb.eurodata.de\e...

PS C:\Windows\system32> 

However running the same script on the production server, $objects remains empty whenever I specify -Name for the virtual machine.
Get-VBRJobObject without -Name:

Code: Select all

PS C:\Users\Administrator> $Job = Get-VbrJob -Name 'VSphere-Management'
Get-VBRJobObject -Job $Job

Name Type ApproxSize Location                 
---- ---- ---------- --------                 
VSphere-Management Include 1,1 TB vc4.edsb.eurodata.de\e...
Get-VBRJobObject with -Name:

Code: Select all

PS C:\Users\Administrator> $Job = Get-VbrJob -Name 'VSphere-Management'
Get-VBRJobObject -Job $Job -Name 'pcli.edsb.eurodata.de'.


PS C:\Users\Administrator> 
Even the example for Get-VBRJobObject under https://helpcenter.veeam.com/docs/backu ... ml?ver=110 works on the test and not on production...

Both servers have
- same version Veeam B&R incl. all patches 11.0.0.837 P20210507
- same Powershell version 5.1.17763.1971
- same operating system Windows Server 2019
oleg.feoktistov
Veeam Software
Posts: 2021
Liked: 673 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get-VBRJobObject no result with -Name

Post by oleg.feoktistov »

Hi Walter,

If I read the output from the PS console you shared correctly, in case with production server the name you pass to Get-VBRJobObject cmdlet doesn't correspond to the name from previous console output of Get-VBRJobObject -Job $Job. If object's name is 'VSphere-Management', that's what you should pass to -Name parameter instead of 'pcli.edsb.eurodata.de'. Or is it just the wrong name inserted here and it doesn't really work with 'VSphere-Management' either?

Thanks,
Oleg
wane
Enthusiast
Posts: 39
Liked: 6 times
Joined: Jun 26, 2020 9:47 pm
Full Name: Walter Neu
Contact:

Re: Get-VBRJobObject no result with -Name

Post by wane »

VSphere-Management is the backup job itself and pcli.edsb.eurodata.de is the VM inside the backup job...

It doesn't matter what job I take either. The behaviour is always the same:

Code: Select all

PS C:\Users\Administrator>
$Job = Get-VbrJob -Name 'DB'
Get-VBRJobObject -Job $Job

Name                      Type       ApproxSize       Location                 
----                      ----       ----------       --------                 
DB                        Include    4,7 TB           vc4.edsb.eurodata.de\e...

PS C:\Users\Administrator> 

Code: Select all

PS C:\Users\Administrator> 
$Job = Get-VbrJob -Name 'DB'
Get-VBRJobObject -Job $Job -Name pg-test-a.db


PS C:\Users\Administrator>
oleg.feoktistov
Veeam Software
Posts: 2021
Liked: 673 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get-VBRJobObject no result with -Name

Post by oleg.feoktistov »

Sorry, I’m still confused. The last ps console output you shared also clearly indicates that the VM name is the same as the job’s. And then I see that you are trying to parse it by a different name. If it is a mistake, please, share the screenshot from Virtual Machines step of job settings. Thanks!
wane
Enthusiast
Posts: 39
Liked: 6 times
Joined: Jun 26, 2020 9:47 pm
Full Name: Walter Neu
Contact:

Re: Get-VBRJobObject no result with -Name

Post by wane »

in my last post, the Name of the Backup Job is DB and the vm is pg-test-a.db which is to be backuped inside the job.

BUT, I have a fear about what it is: We back up folder-based. And Get-VBRJobObject can't seem to read out the VM from it. On the test position we do NOT specify a folder within the job, but the VM....
oleg.feoktistov
Veeam Software
Posts: 2021
Liked: 673 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: Get-VBRJobObject no result with -Name

Post by oleg.feoktistov »

Alright, now it is all clear to me. As soon as you add virtual entity to your backup job, it is reflected as a sole include with no other child in its hierarchy. In your case you added folder named 'DB' as a job object and there is a VM called 'pg-test-a.db' inside this folder, Get-VBRJobObject will return only the folder, so will the UI. Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests