Remove, Add and Deploy solution

11/01/2012 14:15

Basic task against solution


List of solutions



If is deployed, uninstall it

Uninstall-spsolution solutiionName.wsp -webapplication http://tdspui

Remove-spsolution solutionName.wsp


Add new solution

Add-SPSolution c:\GBP.Install\sitecollection.wsp
Install-SPSolution –Identity sitecollection.wsp –WebApplication "http://td_sp_ui" -GACDeployment -force


There is difference between solutions. If they contains resources, they are installed to web application, if not, they are without this parameter.


  if ($solution.ContainsWebApplicationResource)
            Install-SPSolution -Identity $solutionName -GACDeployment -WebApplication $webAppUrl -Force:$true -Confirm:$false
            Install-SPSolution -Identity $solutionName -GACDeployment -Force:$true -Confirm:$false