Wednesday, September 9, 2015

SharePoint Health Analysis with PowerShell

Here is a quick tip that I use after having installed a SharePoint farm, in order to check its configuration.
It’s a PowerShell script that runs all health analysis jobs immediately. Once the jobs are done, you can navigate to “Monitoring” and then “Review problems and solutions” to check if anything is wrong.
THE HEALTH ANALYSIS SCRIPT
Get-SPTimerJob | where {$_.Title -like "Health Analysis *"}
$jobs = Get-SPTimerJob | Where-Object {$_.Title -like "Health Analysis *"}
foreach ($job in $jobs)
{
    $job.RunNow()
}

CHECK HEALTH REPORTS

Once the script has been run, navigate to the Central Administration of your SharePoint Farm.
In the “Monitoring” Section, click on “Review problems and solutions” to display a list of all health reports compiled by the health analysis jobs.

No comments:

Post a Comment