SharePoint WSP Deployment Commands

SharePoint WSP Deployment Command

1. /*UnInstall Sollution */
Uninstall-SPSolution –Identity Demo.wsp –WebApplication http://spserver:24555/

2. /*Remove Sollution */
Remove-SPSolution –Identity Demo.wsp

3. /*Add Sollution */
Add-SPSolution C:\Publish\Demo.wsp

4./*Install Sollution */
Install-SPSolution –Identity Demo.wsp –WebApplication  http://spserver:24555/ -GACDeployment

5./*Update Sollution */
Update-SPSolution -Identity Demo.wsp -LiteralPath C:\Publish\Demo.wsp -GACDeployment

SharePoint – Check WSP Deployment on Server

We can check deployment of WSP File from below PowerShell Script

# Connect to the Farm
$SPfarm = [Microsoft.SharePoint.Administration.SPFarm]::get_Local()

# What Solution are we looking for?
$solution = "MyRequestShowNew.wsp";

# Get the solutions
$currentSolution = $SPfarm.get_Solutions() | Where-Object { $_.DisplayName -eq $solution; }