Quantcast
Channel: SharePoint Diary
Viewing all articles
Browse latest Browse all 1058

Force Run SharePoint Health Analyzer Jobs on Demand

$
0
0
We may want to run SharePoint health analyzer on-demand to check if everything is alright in the farm, without waiting for them to run automatically. Well, as discussed in my another article, Run SharePoint 2010 Timer Jobs On-Demand with PowerShell , we can force run SharePoint Health Analyzer timer Jobs on Demand with PowerShell!

How to run SharePoint 2010/2013 health analyzer with PowerShell:
Lets use PowerShell to force run health analyzer jobs.
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Display name of the Timer Job to Run on-demand
$TimerJobName = "Health Analysis Job"

#Get the Timer Job
$TimerJobs = Get-SPTimerJob | where { $_.DisplayName -match $TimerJobName}

foreach($TimerJob in $TimerJobs)
{
Write-Host "Running:" $TimerJob.DisplayName
$TimerJob.RunNow()
}
This script executes all timer jobs with "Health Analysis Job" in its display name which performs health check immediately!
Run SharePoint 2013 Health Analyzer Jobs on Demand

One Liner to SharePoint 2010/2013 run all health analyzer:
Get-SPTimerJob | where { $_.DisplayName -match "Health Analysis Job"} | % { Start-SPTimerJob $_ ; Write-Host "Runing Job:" $_.displayName } # 

Viewing all articles
Browse latest Browse all 1058

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>