15

I started some solutions deployment with batch file and one of them was hanging. So I stopped the script and tried to retract that one solution to deploy it once again

stsadm -o retractsolution -name solutionname.wsp -immediate -allcontenturls

This gives me error message:

A deployment or retraction is already under way for the solution "solutionname.wsp", and only one deployment or retraction at a time is supported.

I tried to stop it with iisreset and by going to Services and restarting SharePoint 2010 Timer service. That didn't help.

How to stop previous solution deployment, so I can try again?

2 Answers 2

21

There is a stsadm -o canceldeployment -id <id>

To get the ID you have to use stsadm -o enumdeployments

Just be sure that your Timer Job is running.

1
  • 5
    stsadm -o execadmsvcjobs to process current deployments could also help. Commented May 14, 2012 at 9:12
5

Paul Liebrand posted a blog post which would do the magic in PowerShell.

I assume you could modify the where/? part to fit your needs, like matching the solution id for example.

Get-SPTimerJob | ? {$_.Name -like "Solution-Deployment*" } | % { $_.Delete() }

I haven't got a chance to try this myself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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