PowerShell script exchange
Post Reply
cmaier
Enthusiast
Posts: 41
Liked: 4 times
Joined: Feb 24, 2014 4:01 pm
Full Name: Christian Maier
Contact:

Set-VBRBackupRepository. Object reference not set.

Post by cmaier »

Hi,

I try to limit the maximum concurrent tasks for my repository:

Code: Select all

 Get-VBRBackupRepository -Name 'myRepository' | Set-VBRBackupRepository -LimitConcurrentJobs -MaxConcurrentJobs 6
But it does not work. I get the following error message:

Code: Select all

Set-VBRBackupRepository : Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
At line:1 char:43
+ ... 'vCenter' | Set-VBRBackupRepository -LimitConcurrentJobs -MaxConcurre ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Set-VBRBackupRepository], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Veeam.Backup.PowerShell.Command.SetVBRBackupRepository
What does it mean?
Andreas Neufert
VP, Product Management
Posts: 7080
Liked: 1511 times
Joined: May 04, 2011 8:36 am
Full Name: Andreas Neufert
Location: Germany
Contact:

Repository Description

Post by Andreas Neufert »

For me the follwing did the Job:

Code: Select all

Asnp VeeamPSSnapin
$Repository = Get-VBRBackupRepository -name "REP01"
$Repository.Info.Description
$Repository.Info.Description = "Test"
$Repository.SaveOptions()
$Repository
But I was not able to set it with

Code: Select all

Asnp VeeamPSSnapin
$Repository = Get-VBRBackupRepository -name "REP01"
Set-VBRBackupRepository -Repository $Repository  -Description "Test2"
or

Code: Select all

Asnp VeeamPSSnapin
$Repository = Get-VBRBackupRepository -name "REP01"
$Repository | Set-VBRBackupRepository -Description "Twst Powershell" 
Any Idea why?
cmaier
Enthusiast
Posts: 41
Liked: 4 times
Joined: Feb 24, 2014 4:01 pm
Full Name: Christian Maier
Contact:

Re: Repository Description

Post by cmaier »

SaveOptions() is a nice workaround for my problem. Thanks :)

However, I'd like to know why Set-VBRBackupRepository does not work as expected, too.
Vitaliy S.
VP, Product Management
Posts: 27378
Liked: 2800 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Limit repository's max concurrent tasks

Post by Vitaliy S. »

Hi Christian, please open a support case with our team, as this error message is not expected. Thanks!
Vitaliy S.
VP, Product Management
Posts: 27378
Liked: 2800 times
Joined: Mar 30, 2009 9:13 am
Full Name: Vitaliy Safarov
Contact:

Re: Repository Description

Post by Vitaliy S. »

We will try to reproduce it internally and once we have more info I will update this topic. Thanks!
Andreas Neufert
VP, Product Management
Posts: 7080
Liked: 1511 times
Joined: May 04, 2011 8:36 am
Full Name: Andreas Neufert
Location: Germany
Contact:

Re: Repository Description

Post by Andreas Neufert »

Another workaround is to set another option together with the description:

Code: Select all

Get-VBRBackupRepository -Name Linux | Set-VBRBackupRepository -MaxConcurrentJobs 4 -MountServer (Get-VBRBackupRepository -name Linux).getmounthost($null)
works as well based on feedback from a partner.
veremin
Product Manager
Posts: 20411
Liked: 2299 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Limit repository's max concurrent tasks

Post by veremin »

Few things to check:

- Whether the backup repository object is returned correctly. If you input just Get-VBRBackupRepository -Name 'myRepository', will the said repository be returned?
- Whether the service account has required permissions. If you right-click on a script and run it as administrator, will the same error be shown?

Thanks.
cmaier
Enthusiast
Posts: 41
Liked: 4 times
Joined: Feb 24, 2014 4:01 pm
Full Name: Christian Maier
Contact:

Re: Limit repository's max concurrent tasks

Post by cmaier »

I use the workaround with SaveOptions() decribed here. Thanks
veremin
Product Manager
Posts: 20411
Liked: 2299 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Repository Description

Post by veremin »

It has been identified as a bug. Both v9 and v9 U1 are affected. As a workaround, you should use either SaveOptions() method or set -EnableVPowerNFS switch each time you try to update repository settings.

Code: Select all

Get-VBRBackupRepository -Name "Name of your repository"| Set-VBRBackupRepository -Description "New Description" -EnableVPowerNFS
Thanks.
cmaier
Enthusiast
Posts: 41
Liked: 4 times
Joined: Feb 24, 2014 4:01 pm
Full Name: Christian Maier
Contact:

Re: Set-VBRBackupRepository. Object reference not set.

Post by cmaier »

Thanks, good to know. I can live with the workaround at the moment.
veremin
Product Manager
Posts: 20411
Liked: 2299 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: Set-VBRBackupRepository. Object reference not set.

Post by veremin »

We've spotted it recently, thanks be to your posts, guys, and are planning to address it in Update 2. Thanks.
Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests