SharePoint Config

Ari Bakker's thoughts on customising and configuring SharePoint

Instant SharePoint Health Analysis

with 2 comments

The SharePoint 2010 Health Analyzer is a great way of getting information about the state of your SharePoint farm. It checks things including disk space and database fragmentation and other security, performance and configuration issues. If the health analyzer finds issues you are presented with a message when you browse to the Central Administration site. There is also a link to find out details of all problems that were found.

sp2010-health-critical

One thing to note, however, is that it can take a few days or weeks before all the health rules are run on the default schedules. When building a new farm it can be useful to get instant feedback, so you can make sure the new installation is in a healthy state. Did you remember to remove the farm account from the administrators group after setting up User Profile Synchronization? I find this helpful as a consultant as I can rectify issues such as disk space or other problems while I’m on-site with a client and avoid having to return if something is missed.

To get instant feedback you can run all the health analysis jobs immediately through PowerShell. Note that this will place some load on your system so running this on a live environment should be done with caution but in the case of a fresh build with no users that is unlikely to be an issue.

To run all the jobs immediately fire up a SharePoint 2010 Management Shell as a farm administrator and drop in the following PowerShell:

$jobs = Get-SPTimerJob | Where {$_.DisplayName -match "Health Analysis Job"}

foreach($job in $jobs) {

  Write-Host "Running" . $job.DisplayName

  $job.RunNow()

}

You should now see any problems appear in the Health Analyser screen, ready for you to address while you are on site before the client sees an angry red message when they use Central Administration the next day. Note this can take a few seconds to update so check the timer job history or the modified column to ensure the latest results are showing.

sp2010-health-problems

Once you have fixed the issues you can either run the PowerShell again or check the rules individually using the Reanalyze Now button that is displayed within each problem.

clip_image001

As a side note some of the common non-trivial messages are:

Missing server side dependencies.

Explanation: [MissingWebPart] WebPart class [8d6034c4-a416-e535-281a-6b714894e1aa] is referenced [6] times in the database [AdminContentDB], but is not installed on the current farm. Please install any feature/solution which contains this web part. One or more web parts are referenced in the database [AdminContentDB], but are not installed on the current farm. Please install any feature or solution which contains these web parts.

Solution: Following the steps in the article Missing Server Side Dependencies – 8d6034c4-a416-e535-281a-6b714894e1aa to browse to the SearchAdministration.aspx and SearchFarmDashboard.aspx in Central Adminstration and perform an iisreset seemed to fix the issue for me.

The server farm account should not be used for other services.

Explanation: DOMAIN\spfarm, the account used for the SharePoint timer service and the central administration site, is highly privileged and should not be used for any other services on any machines in the server farm. The following services were found to use this account: User Profile Synchronization Service(Windows Service)

Solution: Unfortunately I don’t have an easy fix for this one (assuming it is referring to the User Profile Service – any other services should not be running as the farm account). Spence and Spence on TechNet both indicate the farm account must be used to run the User Profile Synchronization service application. Changing this to any other managed account seems to break the UPS app so if you know how to avoid this please let me know.

Verify that the Activity Feed Timer Job is enabled

Explanation:The newsfeed displayed on My Site and Profile pages uses the Activity Feed Timer Job. Without this timer job, no newsfeed will be available on My Site and Profile pages. This also applies to any third-party product that uses this newsfeed.

Solution: Start the User Profile Service Application – Activity Feed Job from the Monitoring > Job Definitions page in Central Administration.

Post to Twitter Post to Delicious Post to Digg Post to Reddit Post to StumbleUpon

Written by Ari Bakker

January 29th, 2011 at 5:12 pm

2 Responses to 'Instant SharePoint Health Analysis'

Subscribe to comments with RSS or TrackBack to 'Instant SharePoint Health Analysis'.

  1. Thanks for the nice script!

    I’m getting the same health analysis security error with the User Profile Service. I have not found any way around this – the technet article below specificaly requires the farmadmin account – so I guess we have to live with the blaring red bar…

    http://technet.microsoft.com/en-us/library/ee721049.aspx

    Brad Cote

    29 Jan 11 at 6:36 pm

  2. […] I got to this point, I ran the PowerShell script found here – http://www.sharepointconfig.com/2011/01/instant-sharepoint-health-analysis/ in order to instantly see any issues I still had with my farm configuration.  From this report I […]

Leave a Reply

*