PowerShell: SharePoint - Restore / Reprovision Timer Jobs

Updated on 7/12/2013
$farm = Get-SPFarm 
$farm.TimerService.EnsureDefaultJobs()

$usageService = Get-SPUsageService 
$usageService.Provision()

$topProxy = Get-SPTopologyServiceApplicationProxy
$topProxy.Provision()

$farm = Get-SPFarm 
[Microsoft.SharePoint.Diagnostics.SPDiagnosticsProvider]::ProvisionAll($farm)

$ssa = Get-SPEnterpriseSearchServiceApplicationProxy
$ssa.Provision()

#Virus Scanner Update
$webservice = [Microsoft.SharePoint.Administration.SPWebService]::AdministrationService 
$webservice.AntivirusSettings.DownloadScanEnabled = $webservice.AntivirusSettings.DownloadScanEnabled
$webservice.Update()
 
$webservice = [Microsoft.SharePoint.Administration.SPWebService]::ContentService 
$webservice.AntivirusSettings.DownloadScanEnabled = $webservice.AntivirusSettings.DownloadScanEnabled
$webservice.Update()

#Health Analysis Jobs, make the rule visible on the health analyzer rule definition page
#once it is visible then run it from the page in central admin
$healthRulesList = [Microsoft.SharePoint.Administration.Health.SPHealthRulesList]::Local
$item = $healthRulesList.Items | ? {$_.Title -eq "Some health analyzer rules do not have associated timer jobs."}
$item["HealthReportCategory"] = "Configuration"
$item.Update()