Tuesday, June 19, 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.
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.
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.
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.
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.
Remove-SPSolution –Identity “testapp.wsp”

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

No comments:

Post a Comment