Answered WarmUp script for SharePoint 2010

  • 2012年8月6日 下午 09:33
     
     

    Hi,

    I'm setting up a new SharePoint 2010 form and now I wanted some WarmUp script so that it hits each and every site in the farm. Can anybody provide me how to achieve that or any pointers so that I can download.

    Thank you very much!


    Thanks, Hitchs

所有回覆

  • 2012年8月6日 下午 10:28
     
     提議的解答

    Here's a PowerShell script that can be configured to run on SP WFE server as a task scheduler. Typically, the app pools are scheduled to recycle every night by default.  The script simulates the process of accessing the SP site through a web request API call.

    http://www.jonthenerd.com/2011/04/19/easy-sharepoint-2010-warmup-script-using-powershell/


  • 2012年8月7日 上午 12:18
     
     

    Hi Guru,

    Thanks for the response!

    Can you please advise me how to run this script? I have no idea how to do that.

    And also one more question, does it hits all the Site collections and their sub sites in the farm?


    Thanks, Hitchs

  • 2012年8月7日 上午 08:05
     
     提議的解答

    Hi,

    http://nearbaseline.com.au/blog/2010/02/powershell-warmup-script-2/

    create file with Warmup2.ps1 extension, code code in that file. Open Powershell (run as adminsitrator) and goto directory where u save .ps1 file and execute it like .\Warmup2.ps1

    You can also schedule it using task scheduler after recycling all application pools.

    Thanks. 


    iffi

  • 2012年8月7日 下午 12:15
     
     提議的解答
    Older info, but still applies: http://www.loisandclark.eu/Pages/warmup.aspx

    Kind regards,
    Margriet Bruggeman

    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com

  • 2012年8月7日 下午 02:53
     
     提議的解答

    http://spwakeup.codeplex.com/

    I use this as a scheduled task every morning at around 5AM.  Works great.  Just be sure it is happening after your IIS recycling. Also, if you have multiple WFEs, be sure to set this to run on each of them.


  • 2012年8月8日 下午 07:10
     
     

    Hi Imughal,

    Thanks for your help!

    Well, I like this script which is displaying all the site collections. I have few doubts which are

    1. Is it hitting only the site collections or all the sub sites under that Site collection as well?

    2. How can we exclude some Site collections which we don't want to hit?

    I really appreciate your help.

    Thanks


    Thanks, Hitchs

  • 2012年8月8日 下午 07:14
     
     

    Hi Andrew,

    Thanks for your help.

    I tried this application earlier, but it is leaving huge amounts of log file like 400,000kb(Since it has Verbose enabled, I saw it in the code of this application) or around that number depending on no of Web-apps. We can't afford that much space on the server, which will be growing daily.

    Is there any other idea to get rid of that or you guys just leave the way it is?

    I really appreciate your help.

    Thanks.


    Thanks, Hitchs

  • 2012年8月8日 下午 08:06
     
     

    Hitchs,

    I thought that verbose was false by default unless you used the -verbose trigger.  This seems to be the case when I look at the source code.  What logs are you referring to it creating?  ULS Logs?  I'm not seeing that problem.  My environment has ~15 web applications.

  • 2012年8月8日 下午 08:53
     
     

    Yes, ULS logs. You might have to check your log files. Because if you see the source code, it is writing every site that it is hitting on to the log files.

    My environment is very big I've ~25 web apps and out of 25 I've 4 web apps with 600 site collections and almost 1500-1600 sub sites existing. So if I run this script, it is spitting almost 400,000kb log file. Which I don't think anybody recommends.

    Do you have anyother ideas? What if you don't want some site to hit? any work around for this?

    Thanks.


    Thanks, Hitchs

  • 2012年8月9日 上午 11:54
     
     已答覆

    My environment is much smaller, which is likely why i'm not seeing the hit in ULS logs.  I did take a closer look and saw the spwakeup3 logs in there.

    According to the codeplex site, you can omit specific webs by using the -exclude switch. An example from the site:

    spwakeup3.exe -Exclude:http://badsite.com -Exclude:http://badsite2.com