Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm having a warmup script that I want to run after an Update-SPSolution

foreach( $file in $solutionsxml.Solutions.Solution) 
{
    $filename = $file.name;

    Write-Host "  Updating:" $filename

    Update-SPSolution -LiteralPath "$localpath$filename" -Identity $filename -GACDeployment
}

. .\warmup.ps1

what's the best way to detect that the server is up and running? (before executing the warmup script?)

share|improve this question

1 Answer 1

up vote 2 down vote accepted

I normally do something like this, for a specific solution (so in your case it will be put in the foreach:

$solution = get-SpSolution $fileName
while($solution.JobExists)
{
    start-sleep -s 5
    Write-Host -NoNewline "."
}

#Here you know the job is finished, and you can start your update
share|improve this answer
    
How do you get the "." in one line like ".." "..." (like a loding bar... ) –  Plexus81 Aug 5 at 9:01
1  
You can use Write-Host -NoNewline "." –  Robert Lindgren Aug 5 at 9:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.