I have a few timer jobs which I cannot delete. Using Get-SPTimerJob I am able to find the jobs and the GUIDS, but when I try to delete them I receive the following error:
PS C:\Windows\system32> $job = Get-SPTimerJob -id a066a06c-513b-4fe4-a557-a36b420da7e6
PS C:\Windows\system32> $job.Delete()
Exception calling "Delete" with "0" argument(s): "Object reference not set to an instance of an object."
At line:1 char:12
+ $job.Delete <<<< ()
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException
I then tried stsadm.exe in case the SP Snap-in console wasn't functioning properly.
PS C:\Windows\system32> stsadm.exe -o deleteconfigurationobject -id a066a06c-513b-4fe4-a557-a36b420da7e6
Object reference not set to an instance of an object.
I have stopped and restarted the owstimer, tried this with both the timer started and stopped, but all without success. I am running PS with Admin privileges.
$job.delete() You cannot call a method on a null-valued expression.