Friday, January 25, 2008

How-To: Cancel Deployment

Some times when the solution deployment got stuck in the list and shows "Deploying" for a long time, we will have to cancel it and maybe re-deploy it again.

First we need to get the deployment id:

stsadm -o enumdeployments

<Deployments Count="1">
   <Deployment JobId="7bf469db-66cd-4333-9fe8-ddeb0c138466">
      <Title>Windows SharePoint Services Solution Deployment for "abc.wsp"</Title>
      <Type>Upgrade</Type>
      <State>Active</State>
      <File>abc.wsp</File>
      <ServerType>Front-end Web server</ServerType>
   </Deployment>
</Deployments>

 

Notice the JobId you got.

Next, cancel the deployment by the JobId above:

stsadm -o canceldeployment -id 7bf469db-66cd-4333-9fe8-ddeb0c138466