Wednesday, 6 February 2019

Deploy WSP Files Globally



Add-PSSnapin Microsoft.SharePoint.PowerShell


Get-ChildItem "E:\testfolder\" -Filter *.wsp |
Foreach-Object {
    $name =  $_.Name
     Add-SPSolution -LiteralPath "E:\testfolder(Create folder and keep all wsp files in this folder)\$($name)"
     #Install-SPSolution -Identity $name -GACDeployment -Force -CompatibilityLevel {14,15} -FullTrustBinDeployment
     Install-SPSolution -Identity $name -WebApplication "https://webapplication" -GACDeployment -Force -CompatibilityLevel {14,15} -FullTrustBinDeployment
    Write-Host $name
   
}
 stsadm -o execadmsvcjobs
#Install-SPSolution -Identity ABC.wsp -GACDeployment -CompatibilityLevel {14,15} -FullTrustBinDeployment