Issue

After updating to powerJobs version 18.0.11 or newer some or all jobs throw an error like "Could not index into a null array"


Cause

This is caused by a code breaking change in powerJobs 18.0.11. The job parameters used to be in the $powerJobs.Job.Params collection. This changed so the parameters are all in the new $job object.


Solution

You have to replace all occurrences of the old $powerJobs.Job.Params with the new $job object. For example $powerJobs.Job.Params["EntityId"] changes to $Job.EntityId.


  • Navigate to "C:\ProgramData\coolOrange\powerJobs"
  • Open the Setup_job.ps1 and make sure to replace all occurences in there
  • Also check the ps1 and psm1 files in the jobs and modules folder


See Also

The job object