SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Please tell me how to write a Powershell script that will deploy all added farm solutions.

share|improve this question
up vote 2 down vote accepted

The best solution is to use a script that will add the solutions to the SharePoint farm, and deploy them by selecting web application you want to install the script.

Follow those links:

share|improve this answer
Thank you. Solutions have already been added. I just can not get to the Administration Center (do not ask why) and I want to deploy all the solutions have already been added. – SDG Apr 4 '12 at 8:15

finally i made the following script which will redeploy all the 200 info-path forms in share-point 2010 which was stucked on deploying because of stopped Timer Service

Remove-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue

$forms=Get-SPSolution | ? {($_.Name -like "form-*") -and ($_.Deployed -eq $false)}

foreach($Solution in $forms)    {
    if(($Solution -ne $null) -and ($Solution.ContainsWebApplicationResource){
        Install-SPSolution -identity $Solution.SolutionId  -AllwebApplications -GACDeployment -Force -Confirm:$false
    else    {
        Install-SPSolution -identity $Solution.SolutionId   -GACDeployment -Force -Confirm:$false

you may need to cancel all stuck in deploying jobs (or installing in infoPath Form management area) with below similar scipt

 Get-SPTimerJob | ? {$_.Name -like "Solution-Deployment*" } | % { $_.Delete() }
share|improve this answer
Unfortunately , this script does not resolved my problem .at first it seems to be working but i cannot understand well why no InfoPath Forms deployed Globally in this way and I finally had to Deploy the 200 forms manually , because i was in a hurry. but because the script is working and have some good tips and will not delete it until i found a fix for it – imanabidi Sep 6 '15 at 11:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.