Force Run SharePoint Health Analyzer Jobs on Demand using PowerShell

We may want to run SharePoint health analyzer on-demand to check if everything is alright on the farm, without waiting for them to run automatically. Well, as discussed in 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 2013 health analyzer with PowerShell?

Let’s use PowerShell to force run health analyzer jobs. Here is the PowerShell to rerun health analyzer

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

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 2013 run all health analyzer:

Get-SPTimerJob | where { $_.DisplayName -match "Health Analysis Job"} | % { Start-SPTimerJob $_ ; Write-Host "Runing Job:" $_.displayName }

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

Leave a Reply

Your email address will not be published. Required fields are marked *