Warm up script in PowerShell for SharePoint 2010 Environment

# Warm up script for web apps along with the site collections within them in SharePoint 2010 environment

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

# The get-webpage function is from http://kirkhofer.wordpress.com/2008/10/18/sharepoint-warm-up-script/

function Get-WebPage([string]$url)
$wc = new-object net.webclient;
$wc.credentials = [System.Net.CredentialCache]::DefaultCredentials;
$pageContents = $wc.DownloadString($url);
return $pageContents;

# Enumerate the web app along with the site collections within it, and send a request to each one of them
foreach ($site in Get-SPSite)
write-host $site.Url;
$html=get-webpage -url $site.Url -cred $cred;

Comments (1)
  1. Anonymous says:

    Un “problema” conocido en las distintas versiones de SharePoint es que los Application Pools de SharePoint

Comments are closed.

Skip to main content