Sign up ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 1 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 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.