How to Delete a Timer Job in SharePoint using PowerShell?
But wait! why do we delete a Timer Job in SharePoint? Well, because:
Delete a Custom Timer Job in SharePoint
There is no Central Admin UI to delete timer jobs in SharePoint. So, lets seek help from PowerShell to delete a timer job in SharePoint.
How to Delete a Timer Job in SharePoint using PowerShell?
Lesson Learnt: Developers - Make sure your Feature deactivation module contains code to delete your custom timer job in SharePoint.
- Your custom timer job may be in stuck state
- You may have orphaned Timer jobs (Timer job without "Server" from Timer job status page in Central Admin)
- Your custom timer job may have created more than one instances (duplicate timer job)
Delete a Custom Timer Job in SharePoint
There is no Central Admin UI to delete timer jobs in SharePoint. So, lets seek help from PowerShell to delete a timer job in SharePoint.
How to Delete a Timer Job in SharePoint using PowerShell?
- Step 1: Obtain the GUID of your target timer job to delete
Get-SPTimerJob | where { $_.name -like "YOUR-Timer-Job-Name" } | Format-Table -autosize -Property LastRunTime,id,name,DisplayName,Status
- Step 2: Get the timer job and delete
Once you obtained the GUID of your timer job to delete, Run this PowerShell cmdlets:
$Timerjob = Get-SPTimerJob -id <Timer Job's GUID> $Timerjob.Delete()
Do not delete any OOTB timer job unless you are very sure what you are doing! If you delete any SharePoint's critical timer jobs, You'll end up re-provisioning SharePoint on the server again.
Lesson Learnt: Developers - Make sure your Feature deactivation module contains code to delete your custom timer job in SharePoint.
How to Delete a Timer Job in SharePoint using PowerShell?
Reviewed by Salaudeen Rajack
on
May 29, 2013
Rating:

How to find the GUID of the timer job?
ReplyDeleteE.g. use: Get-SPTimerJob | where { $_.Title -like "Audit Log Trimming" } | Select ID, WebApplication, Service
Delete