How do you deploy solutions to your SharePoint farm once you've added them to the solution store? Any of the following will work:
But what if you are standing up a new farm or you've received a boatload of new web parts from your developers? Â Deploying multiple solutions using any of the above methods will work, but will be slow, tedious and painful.
The following script will query the farm for all installed web parts that are in a non-deployed status and deploy them all.
deploysolutions.ps1 -URL http://web_application_to_deploy_to
# Title: DeploySolutions # Version: 1.0, 28DEC11 # Author: James Sanders # Purpose: Find all installed farm solutions that are not deployed and deploy them # Command line parameters Param([string]$URL) If (!$URL) { Write-Host; Write-Host "No URL specified, aborting ..."; Exit;} Add-PSSnapin Microsoft.SharePoint.PowerShell -EA SilentlyContinue $Solutions = Get-SPSolution | where {$_.Deployed -eq $FALSE} ForEach ($Solution in $Solutions) { Write-Host "Installing Solution: $($Solution.Name) " -NoNewLine Install-SPSolution -Identity $Solution.Name -GACDeployment -CASPolicies -WebApplication $URL Do {Write-Host -NoNewline .;Start-Sleep 2;} while ($Solution.Deployed -ne $TRUE) Write-Host }