Warmup Script – SharePoint

Got tired of implementing huge warmup scripts, so decided to put together the simplest form. This will hit all site objects within the sharepoint farm.

the $ie.Visible = $true, should only be used in the development phase. It can be set to $false or completely omitted. With false or omitted, it will only spawn a process and not display the GUI of internet explorer.

add-pssnapin microsoft.sharepoint.powershell
$sites=get-spsite -Limit All
foreach ($site in $sites)
	$ie = New-Object -ComObject "InternetExplorer.Application"
	$url = $site.url
	$ie.Visible = $false
	#wait for page to load
	while ($ie.ReadyState -ne 4)
		sleep -Milliseconds 100

Edit 27-July-2016: Changed from single site to all SP sites.