PowerShell Commands : Add, Install, Update, UnInstall, Delete WSP

Using PowerShell Commands and deploying the WSP is very easy. I will explain Add WSP, Install WSP, Update WSP, UnInstall WSP and Remove WSP one by one in the following.

Copy your WSP file to an appropriate location e.g. C:\<foldername>

Launch PowerShell on the SharePoint server Start -> All Programs -> Microsoft SharePoint 2013 Products -> SharePoint 2013 Management Shell1. Adding SharePoint WSP package using PowerShell command:
To Add a WSP package, you must use the following PowerShell command.

Add-SPSolution “<WSP package path>”
e.g.: Add-SPSolution “C:\testfile.wsp”

More info on MSDN

2. Installing SharePoint WSP package using PowerShell command:
To Install a WSP package, you must use the following PowerShell command.

Install-SPSolution -Identity “<wsp package name>” -WebApplication “<url of web application>” -GACDeployment
e.g.: Install-SPSolution -Identity “testfile.wsp” -WebApplication “http://localhost:11111” -GACDeployment

More info on MSDN

3. Uninstalling SharePoint WSP package using PowerShell command:
To uninstall a WSP package, you must use the following PowerShell command.

Uninstall-SPSolution -Identity “<wsp package name>” -WebApplication “<url of web application>”
e.g.: Uninstall-SPSolution -Identity “testfile.wsp” -WebApplication localhost:11111”

More info on MSDN

4. Removing SharePoint WSP package using PowerShell command:
To remove a WSP package, you must use the following PowerShell command.

Remove-SPSolution -Identity “<wsp package name>”
e.g.: Remove-SPSolution -Identity “testfile.wsp”

More info on MSDN

5. Updating SharePoint WSP package using PowerShell command:
To Update a WSP package, you must use the following Powershell command.

Update-SPSolution -Identity “<wsp package name>” -LiteralPath “<physical path of the wsp package>” –GacDeployment
e.g.: Update-SPSolution -Identity “testfile.wsp” -LiteralPath “C:\testfile.wsp” -GacDeployment

More info on MSDN

Hope this article is helpful. Please share if you like.
SHARE

Sudheer Gangumolu

I'm a Software Analyst / Developer / Blogger, having good experience in working with different flavors & Customization of SharePoint (i.e.,SP O365 / 2013 / 2010 / 2007) and .Net Apps. Currently, working on SharePoint 2013 / SharePoint O365. Guiding people on my technologies.

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment