SharePoint Use Cases

  • Home
  • About
  • Our Tools
  • Contact me
SharePoint, SharePoint 2010

Run all SharePoint 2010 health rules now!

Toni Frankola - October 18, 2010

Joel recently posted: Warning to SharePoint Administrators: Don’t Ignore the Red Health Bar and you should follow his advice and maintain your farm. While preparing a roll-out for a client I created yet another SharePoint 2010 lab/test farm. Once finished I wanted to check if everything is okey with the farm, but could not wait for hour/day/week month till health jobs executed via SharePoint timer. Here is a simple PowerShell script to execute all farm health check immediately:

    # check to ensure Microsoft.SharePoint.PowerShell is loaded
    $snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
    if ($snapin -eq $null) {
      Write-Host "Loading SharePoint Powershell Snapin"
      Add-PSSnapin "Microsoft.SharePoint.Powershell"
    }
    
    Get-SPTimerJob | Where {$_.Name -like "*Health*" -and $_.Name -like "*-all-*"} | Start-SPTimerJob
    

    Couple of notes:

    • The script will start all SPTimerJobs that contain words Health and -all- in job name
    • A “health job” with the keyword “-all-” in its name will run on all servers in the farm that run the SharePoint Timer Service and the Usage and Health Data Collection Service application
    • A “health job” with the keyword “-any-” in its name will run on the first server found in the farm that runs the SharePoint Timer Service and the Usage and Health Data Collection Service application.
    • Check full list of SPTimerJob definitions.
    Tags | health-rules, powershell, SharePoint
     0
    Share Now

    Toni Frankola

    Entrepreneur, IT consultant, speaker, blogger, and geek. Co-founder of syskit.com.

    You Might Also Like

    SharePoint

    Key benefits of the SharePoint platform

    February 13, 2008
    SharePoint

    SharePoint vs. File Share – Part 2

    February 14, 2008
    SharePoint

    Running MOSS and Project server on the same machine

    June 2, 2008
    SharePoint

    Site is not highlighted in the top navigation bar

    September 17, 2008
    Previous Post I’ve been awarded SharePoint MVP award!
    Next Post Links for SharePoint 2010 Developers

    Archives

    • January 2021 (1)
    • July 2019 (1)
    • June 2019 (2)
    • March 2019 (1)
    • February 2019 (3)
    • October 2018 (2)
    • August 2018 (2)
    • June 2018 (1)
    • April 2018 (1)
    • February 2018 (1)
    • January 2018 (1)
    • June 2017 (1)
    • April 2017 (1)
    • February 2017 (1)
    • November 2016 (2)
    • August 2016 (1)
    • July 2016 (2)
    • March 2016 (1)
    • February 2016 (2)
    • January 2016 (1)
    • November 2015 (2)
    • December 2014 (1)
    • November 2014 (2)
    • July 2014 (2)
    • June 2014 (2)
    • May 2014 (1)
    • April 2014 (2)
    • March 2014 (1)
    • February 2014 (4)
    • January 2014 (2)
    • December 2013 (1)
    • September 2013 (1)
    • July 2013 (1)
    • June 2013 (1)
    • May 2013 (1)
    • April 2013 (3)
    • February 2013 (1)
    • December 2012 (1)
    • November 2012 (1)
    • September 2012 (1)
    • August 2012 (1)
    • July 2012 (2)
    • June 2012 (4)
    • April 2012 (1)
    • February 2012 (1)
    • January 2012 (1)
    • November 2011 (2)
    • October 2011 (2)
    • September 2011 (2)
    • July 2011 (3)
    • May 2011 (2)
    • April 2011 (1)
    • March 2011 (4)
    • February 2011 (3)
    • January 2011 (4)
    • December 2010 (4)
    • November 2010 (3)
    • October 2010 (3)
    • September 2010 (4)
    • August 2010 (1)
    • July 2010 (4)
    • May 2010 (2)
    • April 2010 (2)
    • March 2010 (3)
    • January 2010 (2)
    • December 2009 (3)
    • November 2009 (5)
    • October 2009 (2)
    • August 2009 (7)
    • July 2009 (3)
    • June 2009 (4)
    • May 2009 (3)
    • April 2009 (5)
    • March 2009 (8)
    • February 2009 (5)
    • January 2009 (8)
    • December 2008 (9)
    • November 2008 (8)
    • October 2008 (7)
    • September 2008 (4)
    • August 2008 (6)
    • July 2008 (5)
    • June 2008 (3)
    • May 2008 (4)
    • April 2008 (6)
    • March 2008 (4)
    • February 2008 (3)
    • January 2008 (6)
    • December 2007 (1)
    • November 2007 (3)
    • October 2007 (3)
    • September 2007 (2)
    • August 2007 (1)
    • July 2007 (12)
    • June 2007 (2)
    • May 2007 (3)

    Connect Us

    All postings on this blog are provided “AS IS” with no warranties, and confer no rights. All entries in this blog are my opinion and don’t necessarily reflect the opinion of my employer.

    • Home
    • About
    • Our Tools
    • Contact me

    Copyright (c) Toni Frankola 2008. - 2019.