Warm-up script for a SharePoint Publishing Environment

I’m doing some performance tuning for a SharePoint 2010 publishing environment at a customer and I had a need for a decent warm up script. Scavenging the net gave me lots of scripts but all of them just warmed up the homepage of a site collection or at best, the homepages of the sub webs. While this might be OK for most people, I’m not satisfied with that because the homepage might be fast after warming up, as soon as a user clicks on a link to another page, he has to wait again.
So, I needed a script which warmed up ALL of my pages. Fired up my PowerGUI and came up with the following…

This pretty much was the thing I was looking for. The customer has about 2200 pages and after this script has run, each and every one of them loads immediately.

2 thoughts on “Warm-up script for a SharePoint Publishing Environment

  • Wednesday, 14 December, 2016 at 09:43

    The line “$sites = Get-SPsite $webApp.Url” might not get all site collections until you add “-Limit ALL”.

    • Tuesday, 27 December, 2016 at 15:57

      You are absolutely right! I have updated the post. Thanks for mentioning it.

Comments are closed.