SharePoint Warm-Up Scripts: A Thing of the Past

Enter a new feature to IIS 8: Application Initialization.  This module will allow you to set Application Pools to always run, regardless if an end user request has been made to them or not.  IIS will instead send a request when the Application Pool is enabled (e.g. server startup, iisreset, and so forth).

To install the Application Initialization module, in Server Manager, go to Manage –> Add Roles and Features Wizard.  Expand the Web Server (IIS) role, and under Web Server –> Application Development, check Application Initialization.  Complete the installation.

Application-Initialization3

Next, find your Web Application application pools.  Right click each one and go to Advanced Settings.  Under (General), change the Start Mode from OnDemand to AlwaysRunning:

image4

Click OK.  If the pool did not already have a w3wp.exe process, one will immediately start.  The next step is to have IIS pre-load the application, helping alleviate JIT lag.

Open a PowerShell command prompt as Administrator.  Run the following command, replacing “SharePoint – 80” with the name of your site (not application pool):

When the Application Pool starts, IIS will send a fake request to the site, forcing a JIT compile to take place. This will speed up the first request an end user makes.

This module is also available for IIS 7.5 here.  Further information and settings about the IIS 8.0 Application Initialization module can be found at learn.iis.net.

7 Comments

  1. Thank you for sharing this. The code snippet is missing a ” @ “preloadEndabled

  2. Thanks for sharing Trevor! In the -PSPATH section of the code, is this the default path for IIS? I am trying this on my sites and it’s not working, but I think it’s because my sites are not stored in the default path for IIS.

  3. just an fyi, this works, but is not supported for SharePoint (2010 or 2013). no immediate plans to make it supported.

    • In which way is it not supported? Are the different PowerShell warm-up scripts which can be found in the net officially supported?

      Just looking for the possible options which can be used.

  4. Hi Trevor.

    Do you know if this works with Windows Authentication? The AlwaysRunning seems to work fine, but the preload doesn’t warm up the sites.

    Have a nice day.

  5. I have tested this as well and it seems like it works well if site is Anonymous but not for authenticated users. Is this correct behavior ?

Leave a Reply