How restore SP default TimerJobs via PowerShell

How restore SP default TimerJobs via PowerShell


How to restore SP Default TimerJobs via Powershell:



Scenario: 

You manage SharePoint 2013 and noticed that the TimerJobHistory table is huge (which is putting a strain on the available storage). On further investigation you notice the job-delete-job-history task has not run for over 10 months. 


The solution to this scenario would be to restore all default TimerJobs. Timer job “job-delete-job-history” is configured by default when a new farm is created. It can be restored by running the command below:


$farm = Get-SPFarm

$farm.TimerService.EnsureDefaultJobs()


Then run the command below for specific web application:


$w = Get-SPWebApplication http://sp

$w.EnsureDefaultJobs()


That should resolve the issue you are experiencing. 




    • Related Articles

    • SplotchCache, you blob of helpfulness and pains

      SplotchCache, you blob of helpfulness and pains by Adriaan Steyn  General, SharePoint Issue Recently had a request from a developer that style sheets are not updating for 1 WebApp, but updating on the other, both on the same farm and same WFE.   ...
    • Travel order lazy approval not working

      Good Morning, Just to Document the troubleshooting that went into resolving the below and to update everyone that all is well again, Please see below: Initial investigation based around the workflows themselves where we would also get errors when ...
    • Exchange Rate webpart

      Old Mutual Wealth have an Exchange rate webpart that displays on the home page of their Intranet, which gets pulled from a list items, being is updated via workflow (https://intranet.ssds.co.za) It sometimes happens that one of the 3 workflows errors ...