Monday, January 18, 2010

Deploy Sharepoint Solution with stsadm.exe

Solution Deployment:
Solutions are deployed in one of two ways: either locally or by using a timer service. This applies both to new deployments, as well as to deployments of solution upgrades. Both local and timer-based deployments can be triggered either by using command-line instructions by stsadm.exe or programmatically by using the object model.
Local deployments that are initiated from the command line by a user with administrator privileges run in the context of the administrator. If initiated by using the timer service, however, the deployment runs in the context of the timer job itself, which uses administrator pool account credentials.


@set PATH=C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN;%PATH%

stsadm -o execadmsvcjobs


To install the feature:
stsadm -o installfeature -name WebPartFeatureName -force

To Activate the feature:
stsadm -o activatefeature -name FeatureName -url http://localhost

To Deactivate the feature:
stsadm -o deactivatefeature -name FeatureName -url http://localhost

To uninstall the feature:
stsadm -o uninstallfeature -name WebPartFeatureName -force

To Add the solution :
stsadm -o addsolution -filename bin\SolutionABC.wsp

To Deploy the solution:
stsadm -o deploysolution -name SolutionABC.wsp -immediate -allowGacDeployment 

To Retract the solution:
stsadm -o retractsolution -name SolutionABC.wsp -immediate -allcontenturls

To delete solution:
stsadm -o deletesolution -name SolutionABC.wsp -override


To Update the Existing Solution :
STSADM.Exe -o upgradesolution -filename filename.wsp -name name.wsp -immediate - allowgacdeployment -allowcaspolicies

To check the running deployments on server:
stsadm -o enumdeployments

IN Last Reset the IIS:
iisreset

No comments:

Post a Comment