How to delete a SharePoint timer job

Recently I got a problem with timer job that is there were two instances got created in central admin. One instance got created with first deployment and another instance got created with second deployment because there were some changes made in timer job. Even though, in feature deactivation event we have written a code to delete existing job but some how it's not get deleted. Now I got required to delete the old job. Unfortunately we do not have any option to delete job at central admin level. After googling I found power shell script to achieve this.


Searching listing and find timer job to delete.We need an id.
Get-SPTimerJob | where { $_.name -like “*<your search criteria>*” } |ft id,name
Set job to a variable
$job = Get-SPTimerJob -id <GUID>
And delete it.
$job.Delete()
I got this information from the below blog.

Comments

Popular posts from this blog

Switch from Classic to Claims Authentication in SharePoint 2010

How to query list data using web service