Tuesday 20 January 2015

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

Working with PowerShell Commands is very easy:

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 Shell


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


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


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


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
 




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 helped your search. Thank You.

No comments:

Post a Comment