Tuesday, 19 June 2012

PowerShell commands for SharePoint Solution deployment (.wsp)


Adding Solution: To add a solution to the form
Add-SPSolution -LiteralPath “.wsp location”
To know more about Add Solution, click here.
Example:
Add-SPSolution -LiteralPath “C:\Projects\testapp.wsp”


Installing Solution: To install a solution to the form
Install-SPSolution -Identity
“.wsp name” -WebApplication “http://webapplication”  -GACDeployment
To know more about Install Solution, click here.
Example:
Install-SPSolution -Identity  “testapp.wsp”  -WebApplication “http://testapp”-GACDeployment


Updating Solution: To update the solution in the form
Update-SPSolution –Identity “.wsp name” –LiteralPath “.wsp path” –GacDeployment
To know more about Update Solution, click here.
Example:
Update-SPSolution –Identity testapp.wsp” –LiteralPath C:\Projects\testapp.wsp” –GacDeployment


Uninstall Solution: To uninstall the solution from the form
Uninstall-SPSolution –Identity “.wsp name” –WebApplication http:// webapplication
To know more about Uninstall Solution, click here.
Example:
Uninstall-SPSolution –Identity “testapp.wsp” –WebApplication http:// testapp


Remove SolutionTo remove the solution from the form
Remove-SPSolution –Identity “.wsp name”
To know more about Remove solution, click here.
Example:
Remove-SPSolution –Identity “testapp.wsp”


Note: To get all SPSolution commands, use the below command:
Get-Command –noun *SPSolution*

No comments:

Post a Comment