Subscribe:

Labels

Thursday, September 27, 2018

Deploy WSP using PowerShell


Add-SPSolution "C:\sharepoint2013\Services.wsp"
Install-SPSolution –Identity Services.wsp –WebApplication http://abc.com/ -GACDeployment

                                                
                                    or


Add-PSSnapin Microsoft.SharePoint.Powershell

Set-ExecutionPolicy unrestricted
echo "Uninstalling solution"
$sln = get-spsolution -identity Services.wsp
Uninstall-SPSolution –Identity Services.wsp –WebApplication http://abc.com/ -Confirm:$false
echo "Started solution retraction..."
while($sln.JobExists) {
echo "> Uninstall in progress..."
start-sleep -s 10
}
remove-spsolution -identity Services.wsp -confirm:$false
Add-SPSolution -LiteralPath C:\Deployments\Services.wsp
Install-SPSolution –Identity Services.wsp –WebApplication http://abc.com/ -GACDeployment


No comments:

Post a Comment