Thursday, December 31, 2015

How to rollback a deployed wsp solution in SharePoint

 

Add-pssnapin "microsoft.sharepoint.powershell"

Set-ExecutionPolicy unrestricted

echo " "

echo "Uninstalling YourSolutionName"

$sln = get-spsolution -identity YourSolutionName.wsp

uninstall-spsolution -identity YourSolutionName.wsp -confirm:$false

echo "Started solution retraction..."

while($sln.JobExists) {

echo " > Uninstall in progress..."

start-sleep -s 10

}

remove-spsolution -identity YourSolutionName.wsp -confirm:$false

echo "Removed YourSolutionName"

echo "  "

 

No comments:

Post a Comment