The following snippet contains the script to retract sharepoint solution packages and de-activate features. This would be become handy to the sharepoint adminstrators, when they want to retract multiple solution packages (wsp) and de-activate multiple features.
rem ** declare the solution to be retracted **
rem ** declare the set of fetures to be de-activated **
rem ** Replace this value with the URL of your site **
@set PATH=C:Program FilesCommon FilesMicrosoft Sharedweb server extensions12BIN;%PATH%
echo deactivating features in solution %solutionName%…
stsadm -o deactivatefeature -name %featureSampleFeature1% -url %url% -force
stsadm -o deactivatefeature -name %featureSampleFeature2% -url %url% -force
stsadm -o deactivatefeature -name %featureSampleFeature3% -url %url% -force
echo Attempting to uninstallfeature and retract solution
echo Rectracting solution %solutionName% from solution store…
stsadm -o retractsolution -name %solutionName%.wsp -immediate
stsadm -o execadmsvcjobs
echo Deleting solution %solutionName% from solution store…
stsadm -o deletesolution -name %solutionName%.wsp -override
if errorlevel == 0 goto :success
echo Successfully deployed solution and activated feature(s)..
Pingback: Script to retract sharepoint solution package (wsp) and deactivate features - My experiments with SharePoint, Azure and .NET using Visual Studio
Thanks a lot for this helpfull scripts
It is possible to do it from SP 2010 Central Administration UI?
If you use -local, the command is synchronized and there is no need to do “execadmsvcjobs”.
stsadm -o retractsolution -name %solutionName%.wsp -local