PowerShell script exchange
Post Reply
Service Provider
Posts: 1
Liked: never
Joined: Dec 21, 2016 2:33 pm
Full Name: Marco Hahnen

[Veeam.Backup.Core.CBackupJob] - Object reference not set to an instance of an object. (v12)

Post by Marco-ITSM »


we just upgraded our Veeam Installation from v11 to v12.

In one of our powershell scripts, I call the following function, because its faster than get-vbrjob:

Code: Select all

which in v12 generates the following error:

Code: Select all

Exception calling "GetAll" with "0" argument(s): "Object reference not set to an instance of an object."
At line:1 char:1
+ [Veeam.Backup.Core.CBackupJob]::GetAll()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : NullReferenceException
Now the fun part: if i call get-vbrjob before calling the .net function, the .net function works fine afterwards.


any ideas?
Veeam Software
Posts: 1132
Liked: 304 times
Joined: Jun 28, 2016 12:12 pm

Re: [Veeam.Backup.Core.CBackupJob] - Object reference not set to an instance of an object. (v12)

Post by david.domask »

Hi @Marco-ITSM, check my answer here:


Basically, this is kind of one of the risks of using .NET reflection :) It's not supported method; I get why you're using it, and hopefully we will see improvements on the officially supported cmdlets in the future, but for now you'll need to use this workaround for your scripts relying on .NET reflection.
David Domask | Product Management: Principal Analyst
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests