Logo 
Search:

MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Warm UP Scripts for 2010?

  Asked By: Aaditya    Date: Feb 02    Category: MOSS    Views: 805

I know there were a number of warm-up scripts to run against 2007. What are the
early adopters of 2010 using? Initial googles have not turned up a definitive
answer yet so, I thought I would ask.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Divakar Naik     Answered On: Feb 02

function get-webpage ([string]$url,[System.Net.NetworkCredential]$cred=$null)
{
$wc = new-object net.webclient
if($cred -eq $null)
{
$cred = [System.Net.CredentialCache]::DefaultCredentials;
}
$wc.credentials = $cred;
return $wc.DownloadString($url);
}
$cred = [System.Net.CredentialCache]::DefaultCredentials;
foreach ($url in $urls) {
$sites = get-spsite -webapplication $url.url
foreach ($site in $sites) {
write-host $site.url;
$html=get-webpage -url $site.url -cred $cred;
}
}

 
Answer #2    Answered By: Marcus Davis     Answered On: Feb 02

for moss 2007, you can use:


new-alias "stsadm" ($env:commonprogramfiles + "\Microsoft Shared\web server
extensions\12\bin\stsadm.exe")
function get-webpage ([string]$url,[System.Net.NetworkCredential]$cred=$null)
{
$wc = new-object net.webclient
if($cred -eq $null)
{
$cred = [System.Net.CredentialCache]::DefaultCredentials;
}
$wc.credentials = $cred;
return $wc.DownloadString($url);
}
$cred = [System.Net.CredentialCache]::DefaultCredentials;

[xml]$x=stsadm -o enumzoneurls
foreach ($zone in $x.ZoneUrls.Collection) {
[xml]$sites=stsadm -o enumsites -url $zone.Default;
foreach ($site in $sites.Sites.Site) {
write-host $site.Url;
$html=get-webpage -url $site.Url -cred $cred;
}
}

 
Didn't find what you were looking for? Find more on Warm UP Scripts for 2010? Or get search suggestion and latest updates.




Tagged: