So, after you’ve set up your farm (Or even if you’ve only just upgraded or added a new WFE to the farm) it’s always interesting to see what Microsoft’s Health Analyzer has to say about the new configuration. Now, we could just sit around and wait for each job to fire off thanks to the SharePoint Timer at various intervals and check periodically as the alerts are triggered, however, I’m more the kind of person who likes to get the bad news all at once. This ends up giving me a nice little checklist of “Things I Need to Fix” for the day (ok, sometimes it takes more than a day).
Enter the power of PowerShell. Using PS, we can look for a list of all SPTimerJobs that have the word “Health” in them, and pass that list of SPTimerJobs into the Start-SPTimerJob commandlet, which will fire off all our Health Analyzer checks in a relatively short time. Here’s the code for PS:
#First load the SharePoint commands if not using the SharePoint PS Shell Add-PSSnapin "Microsoft.SharePoint.Powershell" #And now kick off all Health Timer Jobs Get-SPTimerJob | Where {$_.Name -like "*Health*" -and $_.Name -like "*-all-*"} | Start-SPTimerJob