Install and Uninstall SharePoint Solutions via Powershell

This blog will outline the cmdlets to uninstall and install SharePoint solutions via Powershell.

For installing the solution, first we need to add the solution to the farm:-

Add-SPSolution -LiteralPath “Path where the solution is kept(D:\sharepoint.wsp)”

Final step will be to deploy the solution by using below command :

Install-SPSolution -Identity “Name of the solution(sharepoint.wsp)” -GACDeployment

In case we want to deploy the solution to different versions of SharePoint we have to use Compatibility level parameter.

Install-SPSolution -Identity “Name of the solution(sharepoint.wsp)” -GACDeployment -CompatibilityLevel “14,15”

For uninstallation,

First we need to uninstall the solution which will remove all the existing association from the farm.

Uninstall-SPSolution -Identity “Name of the solution(sharepoint.wsp)”

Post uninstalling, we need to complete the process by removing the solution from the farm.

Remove-SPSolution -Identity “Name of the solution(sharepoint.wsp)”

Hope this blog helps 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s