Wednesday, November 23, 2011

SharePoint 2010 Review Job Definitions Error

Symptom: In central administration, the "Monitoring > Timer Jobs > Review job definitions" page would not display. The error was that there was an invalid GUID.

Of course, the programmer chose to not tell me which GUID was invalid. After poking around a bit and using the PowerShell Get-SPTimerJob cmdlet, I determined that there were two jobs without DisplayName fields.

I reasoned that these jobs were causing the page build to fail because there was nothing to hang the entry on -- DisplayName is used as the Title field on the page display. The Name field for these jobs matched the ID.

I deleted them using the following PowerShell commands. First, I listed the Name and ID of the three jobs:

get-sptimerjob | where {$_.name -eq $_.id} | select name, id, displayname, isdisabled

This command displayed the ID's of the job.
2e1692f0-7f01-4a99-8fb0-99403018561e 2e1692f0-7f01-4a99-8fb0-99403018561e False
b5afe147-1dbe-40b4-b452-0df11c2c647c b5afe147-1dbe-40b4-b452-0df11c2c647c False
e343e08e-645b-4d31-b56a-bd18696cbc92 e343e08e-645b-4d31-b56a-bd18696cbc92 False

Then I used the ID in the following sequence. The Delete() removed the job.

$job = get-sptimerjob -identity 'e343e08e-645b-4d31-b56a-bd18696cbc92'
$job.Delete()

I could have applied the delete in the first lookup, but wanted to be extra careful as I was going to delete something and I might not get it back.

Once I deleted the fields, the page displayed.


No comments:

Post a Comment