Thursday, 2 August 2018

Add, Install,Remove and Uninstall of WSP in SharePoint

Backup WSP

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue
$farm = Get-SPFarm
$wsp = $farm.Solutions.Item("My.wsp").SolutionFile
$wsp.SaveAs("D:\Rajesh\Backup\My.wsp")

Add and Install

Add-SPSolution -LiteralPath D:\Rajesh\WSP\My.wsp
Install-SPSolution -Identity "My.wsp" -WebApplication "http://mysite.corp.com/" FullTrustBinDeployment -force  
Or
Install-SPSolution –Identity "My.wsp" –WebApplication "http://mysite.corp.com/" –GACDeployment -Force

Remove and Uninstall

Remove-SPSolution -Identity My.wsp
Uninstall-SPSolution -Identity My.wsp

Update

Update-SPSolution -Identity "My.wsp" -LiteralPath "D:\Rajesh\My.wsp" -FullTrustBinDeployment -Forc

No comments:

Post a Comment