PowerShell script exchange
cmaier
Enthusiast
Posts: 41 Liked: 4 times
Joined: Feb 24, 2014 4:01 pm
Full Name: Christian Maier
Contact:
Post
by cmaier » Mar 06, 2016 6:52 pm
this post
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:
Post
by Andreas Neufert » Mar 06, 2016 9:35 pm
this post
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:
Post
by cmaier » Mar 07, 2016 8:44 am
this post
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:
Post
by Vitaliy S. » Mar 07, 2016 10:38 am
this post
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:
Post
by Vitaliy S. » Mar 07, 2016 10:38 am
this post
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:
Post
by Andreas Neufert » Mar 08, 2016 9:47 am
this post
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:
Post
by veremin » Mar 21, 2016 12:51 pm
this post
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:
Post
by cmaier » Mar 22, 2016 1:23 pm
this post
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:
Post
by veremin » Mar 23, 2016 2:05 pm
this post
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:
Post
by cmaier » Mar 23, 2016 2:56 pm
this post
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:
Post
by veremin » Mar 23, 2016 3:23 pm
this post
We've spotted it recently, thanks be to your posts, guys, and are planning to address it in Update 2. Thanks.
Users browsing this forum: No registered users and 18 guests